Get current route name anywhere from application


/ Published in: Symfony
Save to your folder(s)

I add this snippet because it's a little bit tricky to find it in API documentaion (it is in sfPatternRouting, not in sfRouting, like one would expect).


Copy this code and paste it in your HTML
  1. sfContext::getInstance()->getRouting()->getCurrentRouteName()

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.