Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 792bf52

Browse filesBrowse files
committed
Merge pull request symfony#1324 from mdpatrick/template_subdirs
Template subdirs
2 parents 15595cd + bcccdc0 commit 792bf52
Copy full SHA for 792bf52

File tree

Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed

‎book/controller.rst

Copy file name to clipboardExpand all lines: book/controller.rst
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,15 @@ The Symfony templating engine is explained in great detail in the
521521
$templating = $this->get('templating');
522522
$content = $templating->render('AcmeHelloBundle:Hello:index.html.twig', array('name' => $name));
523523

524+
.. note::
525+
526+
It is possible to render templates in deeper subdirectories as well, however
527+
be careful to avoid the pitfall of making your directory structure unduly
528+
elaborate::
529+
530+
$templating->render('AcmeHelloBundle:Hello/Greetings:index.html.twig', array('name' => $name));
531+
// index.html.twig found in Resources/views/Hello/Greetings is rendered.
532+
524533
.. index::
525534
single: Controller; Accessing services
526535

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.