Skip to content

Template override correction #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions book/templating.rst
Original file line number Diff line number Diff line change
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