Commit c65e7568 authored by Igor Wiedler's avatar Igor Wiedler Committed by Fabien Potencier

Add note to twig docs that the baseUrl must be prepended

parent 0ff83c40
...@@ -115,10 +115,15 @@ from a template: ...@@ -115,10 +115,15 @@ from a template:
.. code-block:: jinja .. code-block:: jinja
{{ render('/sidebar') }} {{ render(app.request.baseUrl ~ '/sidebar') }}
{# or if you are also using UrlGeneratorServiceProvider with the SymfonyBridgesServiceProvider #} {# or if you are also using UrlGeneratorServiceProvider with the SymfonyBridgesServiceProvider #}
{{ render(path('sidebar')) }} {{ render(url('sidebar')) }}
.. note::
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.
Traits Traits
------ ------
......
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