Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Symfony Plugin to enable Twig usage in templates.
PHP Shell
tree: a65d580c12

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
lib
.gitmodules
LICENSE
README.markdown
package.xml.tmpl

README.markdown

sfTwigPlugin

This plugin tries to integrate the Twig into Symfony

Install

Create a file named module.yml in project/config or app/config dir with the following content.

all:
    view_class: sfTwig
    partial_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.

Something went wrong with that request. Please try again.