Commit 0e69dc22 authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/form-twig-bridge-doc (PR #561)

This PR was merged into the master branch.

Commits
-------

332142f6 Document symfony/twig-bridge requirement for forms in twig templates

Discussion
----------

Document symfony/twig-bridge requirement for forms in twig templates
parents 7e586293 332142f6
...@@ -79,6 +79,15 @@ Registering ...@@ -79,6 +79,15 @@ Registering
"symfony/locale": "2.1.*" "symfony/locale": "2.1.*"
} }
If you want to use forms in your Twig templates, make sure to install the
Symfony Twig Bridge:
.. code-block:: json
"require": {
"symfony/twig-bridge": "2.1.*"
}
Usage Usage
----- -----
...@@ -118,7 +127,8 @@ example:: ...@@ -118,7 +127,8 @@ example::
return $app['twig']->render('index.twig', array('form' => $form->createView())); return $app['twig']->render('index.twig', array('form' => $form->createView()));
}); });
And here is the ``index.twig`` form template: And here is the ``index.twig`` form template (requires ``symfony/twig-
bridge``):
.. code-block:: jinja .. code-block:: jinja
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment