Commit bd7891f8 authored by Fabien Potencier's avatar Fabien Potencier

tweaked previous merge

parent a2d5a015
...@@ -115,20 +115,18 @@ from a template: ...@@ -115,20 +115,18 @@ from a template:
{# or if you are also using the UrlGeneratorServiceProvider #} {# or if you are also using the UrlGeneratorServiceProvider #}
{{ render(url('sidebar')) }} {{ render(url('sidebar')) }}
{# or you can reference a controller directly without defining a route for it #}
{{ render(controller(controller)) }}
.. note:: .. note::
You must prepend the ``app.request.baseUrl`` to render calls to ensure You must prepend the ``app.request.baseUrl`` to render calls to ensure
that the render works when deployed into a sub-directory of the docroot. that the render works when deployed into a sub-directory of the docroot.
.. code-block:: jinja
{# You may also link to the controller directly without defining a route for it: #}
{{ render(controller(controller, attributes, query)) }}
.. note:: .. note::
Visit the symfony documentation for more information: http://symfony.com/doc/current/reference/twig_reference.html#controller Read the Twig reference_ for Symfony document to learn more about the various Twig functions
Traits Traits
------ ------
...@@ -168,3 +166,5 @@ You can configure the Twig environment before using it by extending the ...@@ -168,3 +166,5 @@ You can configure the Twig environment before using it by extending the
For more information, check out the `official Twig documentation For more information, check out the `official Twig documentation
<http://twig.sensiolabs.org>`_. <http://twig.sensiolabs.org>`_.
.. reference_:: https://symfony.com/doc/current/reference/twig_reference.html#controller
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