php - Issue with pathinfo symfony2 -


i follow tips here symfony2 internal route in twig render function helpfull when send on server, request.pathinfo null. have ever had issue ? here codes

{% render(controller('projetchmauleonbundle:mauleon:menu', {'request': app.request})) %} 

my controller

public function menuaction($request) {     $em=$this->getdoctrine()->getmanager();     $repositoryequipe = $em->getrepository('projetchmauleonbundle:equipe');     $tabequipes = $repositoryequipe->findall();      return $this->render('projetchmauleonbundle:mauleon:menu2.html.twig', array('tabequipes'=>$tabequipes, 'request'=>$request)); } 

and view :

{% if request.pathinfo|slice(1,5) == 'ehpad' or request.pathinfo|slice(1,7) == "equipe"  %}     <a id="fontdrop" href="{{path('projetch_mauleon_admissionehpad')}}">votre admission</a> {% elseif request.pathinfo|slice(1,3) == 'ssr' %}     <a id="fontdrop" href="{{path('projetch_mauleon_admissionssr')}}">votre admission</a> {% endif %} 

thank you


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -