Skip to content

Commit

Permalink
Merge pull request symfony#408 from richsage/template-override-correc…
Browse files Browse the repository at this point in the history
…tion

Template override correction
  • Loading branch information
weaverryan committed Jun 16, 2011
2 parents 69b6c5d + 8f38b70 commit 183736a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions book/templating.rst
Expand Up @@ -403,7 +403,7 @@ lives in a specific location:

In the :ref:`overiding-bundle-templates` section, you'll find out how each
template living inside the ``AcmeBlogBundle``, for example, can be overridden
by placing a template of the same name in the ``app/Resources/AcmeBlog/views/``
by placing a template of the same name in the ``app/Resources/AcmeBlogBundle/views/``
directory. This gives the power to override templates from any vendor bundle.

.. tip::
Expand Down Expand Up @@ -952,9 +952,10 @@ We learned in the :ref:`template-naming-locations` section that the template
in question lives at ``Resources/views/Blog/index.html.twig`` inside the
``AcmeBlogBundle`` bundle. To override the bundle template, copy the ``index.html.twig``
template to ``app/Resources/AcmeBlogBundle/views/Blog/index.html.twig`` (the
``AcmeBlogBundle`` directory might not exist). Now, when the
``AcmeBlogBundle:Blog:index.html.twig`` template is rendered, Symfony2 will look
first for the template at
``AcmeBlogBundle`` directory might not exist).

Now, when the ``AcmeBlogBundle:Blog:index.html.twig`` template is rendered,
Symfony2 will look first for the template at
``app/Resources/AcmeBlogBundle/views/Blog/index.html.twig`` before looking
at ``src/Acme/BlogBundle/Resources/views/Blog/index.html.twig``. You're
now free to customize the template for your application.
Expand Down

0 comments on commit 183736a

Please sign in to comment.