Little modification to enable routing from tag list.
authorcavaliet
Wed, 26 Oct 2011 16:01:33 +0200
changeset 17 a16b5806e3f0
parent 16 89a003e5b108
child 21 b91e0b89dccd
Little modification to enable routing from tag list.
src/Company/BaseBundle/Controller/IndexController.php
src/Company/BaseBundle/Resources/views/Index/other_page.html.twig
--- a/src/Company/BaseBundle/Controller/IndexController.php	Wed Oct 26 15:39:04 2011 +0200
+++ b/src/Company/BaseBundle/Controller/IndexController.php	Wed Oct 26 16:01:33 2011 +0200
@@ -19,7 +19,8 @@
     
     public function otherAction()
     {
-        return $this->render('CompanyBaseBundle:Index:other_page.html.twig');
+        $tag_id = $this->getRequest()->query->get('tag');
+        return $this->render('CompanyBaseBundle:Index:other_page.html.twig', array('tag_id' => $tag_id));
     }
     
     
--- a/src/Company/BaseBundle/Resources/views/Index/other_page.html.twig	Wed Oct 26 15:39:04 2011 +0200
+++ b/src/Company/BaseBundle/Resources/views/Index/other_page.html.twig	Wed Oct 26 16:01:33 2011 +0200
@@ -5,6 +5,9 @@
 	<div id="content" class="span-24 last">
 	    <div id="inner_content">
 	       <p>This is a simple template extending the base template.</p>
+	       {% if tag_id %}
+	           <p>You passed the parameter tag_id = {{tag_id}}</p>
+           {% endif %}
 	    </div>
 	</div>
 {% endblock %}
\ No newline at end of file