Skip to content

Commit

Permalink
Added a note about the side effects of enabling both PHP and Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Sep 12, 2014
1 parent 7cbad6d commit 3828162
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cookbook/templating/PHP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ shortcut to render the default ``AcmeHelloBundle:Hello:index.html.php`` template
return array('name' => $name);
}

.. caution::

Enabling the ``php`` and ``twig`` template engines simultaneously is
allowed but it will produce an important side effect in your application:
template namespaces will no longer work::

public function indexAction()
{
// ...

// namespaced templates will no longer work
$this->render('@Acme/Default/index.html.twig');

// traditional template notation will work
$this->render('AcmeBundle:Default:index.html.twig');
}


.. index::
single: Templating; Layout
single: Layout
Expand Down

0 comments on commit 3828162

Please sign in to comment.