Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
7 changes: 7 additions & 0 deletions cookbook/templating/namespaced_paths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ directory:
);
));

.. caution::

Prior to 2.8, templates in custom namespaces are not pre-compiled by
Symfony's cache warmup process. They are compiled on demand. This may
cause problems if two simultaneous requests are trying to use the
template for the first time.

The registered namespace is called ``foo_bar``, which refers to the
``vendor/acme/foo-bar/templates`` directory. Assuming there's a file
called ``sidebar.twig`` in that directory, you can use it easily:
Expand Down