Permalink
Browse files

Renamed README, and added some documentation

  • Loading branch information...
1 parent a0219bc commit 7d924bec16498d38ff9e7ce942d213190016fda8 Henrik Bjørnskov committed Oct 10, 2009
Showing with 18 additions and 1 deletion.
  1. 0 README
  2. +17 −0 README.markdown
  3. +1 −1 lib/view/sfTwigView.class.php
View
0 README
No changes.
View
17 README.markdown
@@ -0,0 +1,17 @@
+sfTwigPlugin
+============
+This plugin tries to integrate the [Twig template engine](http://twig-project.com) into [Symfony](http://symfony-project.org)
+
+Install
+-------
+Create a file named `module.yml` in `project/config` or `app/config` dir with the following content.
+
+ all:
+ view_class: sfTwig
+
+This will enable the sfTwigView class to be used when rendering templates.
+
+Usage
+-----
+Usage is simple, this plugin replaces sfPHPView and therefor the template file extension have changed into .html. But because this is not exactly the same as
+sfPHPView and Twig dosent allow function calling from within the templates none of the normal helpers will work until they have been converted to Twig Extensions.
View
2 lib/view/sfTwigView.class.php
@@ -29,7 +29,7 @@ class sfTwigView extends sfPHPView
*/
public function execute()
{
- $loader = new Twig_Loader_Filesystem('/', sfConfig::get('sf_app_cache_dir') . '/twig', sfConfig::get('sf_twig_template_cache', false));
+ $loader = new Twig_Loader_Filesystem('/', false, sfConfig::get('sf_twig_template_cache', false));
$this->twig = new Twig_Environment($loader);
}

0 comments on commit 7d924be

Please sign in to comment.