From 5f8b8348aa707cc8af1c944e8cec02084c868147 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Thu, 6 Jun 2013 20:30:02 +0200 Subject: [PATCH] Updated doc for the new way to render partials --- cookbook/templating/PHP.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index 40f03611fd0..f57af161816 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -52,7 +52,6 @@ below renders the ``index.html.php`` template:: // src/Acme/HelloBundle/Controller/HelloController.php // ... - public function indexAction($name) { return $this->render('AcmeHelloBundle:Hello:index.html.php', array('name' => $name)); @@ -226,10 +225,12 @@ If you create a ``fancy`` action, and want to include it into the .. code-block:: html+php - render('AcmeHelloBundle:Hello:fancy', array( - 'name' => $name, - 'color' => 'green' - )) ?> + render( + new ControllerReference('AcmeHelloBundle:Hello:fancy', array( + 'name' => $name, + 'color' => 'green', + )) + ) ?> Here, the ``AcmeHelloBundle:Hello:fancy`` string refers to the ``fancy`` action of the ``Hello`` controller:: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy