Commit 49d36f80 authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/twig-render-baseurl (PR #529)

This PR was squashed before being merged into the master branch (closes #529).

Commits
-------

c65e7568 Add note to twig docs that the baseUrl must be prepended

Discussion
----------

Add note to twig docs that the baseUrl must be prepended

---------------------------------------------------------------------------

by igorw at 2012-11-05T17:52:25Z

Refs #524.

---------------------------------------------------------------------------

by igorw at 2012-11-05T19:48:48Z

Changed `path` to `url` in the example.
parents 14edb173 c65e7568
......@@ -115,10 +115,15 @@ from a template:
.. code-block:: jinja
{{ render('/sidebar') }}
{{ render(app.request.baseUrl ~ '/sidebar') }}
{# 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
------
......
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