Permalink
Browse files

usage of the helper generator

  • Loading branch information...
1 parent 388133b commit 547616dbecd149b44e9af5e8180a138772f245b9 Videla Alvaro committed Oct 12, 2009
Showing with 12 additions and 1 deletion.
  1. +12 −1 README.markdown
View
@@ -22,4 +22,15 @@ 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.
+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.
+
+To Generate the port of symfony helpers into Twig Extensions do the following:
+
+ cd ./plugins/sfTwigPlugin
+ ./helpers.sh /path/to/syfmony/lib/helper/
+
+This script will scan the symfony helper folder (Or any folder with files ending with Helper.php) and with create Twig Extensions based on them inside the ./lib/extensions folder of the plugin. sed, awk & php must be in the path.
+
+Then in order to use the UrlHelper with Twig you can do:
+
+ $twig->addExtension(new Url_Twig_Extension());

0 comments on commit 547616d

Please sign in to comment.