php > framework > symfony > plugin
The sfSimplePagePlugin allows you to manage like static pages with symfony.
for example, if the request is like this
http://example.com/frontend_dev.php/static/sample.html
the module of this plugin, which is sfSimplePage module, render the sample.html in ./data/static directory.
if the request is like this
http://example.com/frontend_dev.php/static/hoge/sample2.html
render the sample2.html in ./data/static/hoge directory.
These page is rendered by symfony, so you can use view system of partial, component, helper…
Symfony has actions and templates. And the main role of actions is to control the screen transition like a page to display the filter or a page to display retrieval results.
But if you don't need to control the screen transition like a static page or a simple page, this sfSimplePagePlugin is suitable for you.
This plugin can pass through actions because of resolving the template name with PATH_INFO.
If you need to access DB, you can access it with a component. It's simple.
$ ./symfony plugin-install http://plugins.symfony-project.com/sfSimplePagePlugin
$ svn co http://svn.symfony-project.com/plugins/sfSimplePagePlugin/trunk
public function setup() { $this->enablePlugins('sfSimplePagePlugin'); }
all:
.settings:
enabled_modules: [default, sfSimplePage]
$ mkdir ./data/static
$ ./symfony cc