Symfony action name in template

How to get the action name inside the template? The pattern is actually partial.

+5
source share
2 answers

You must try:

$sf_params->get('action')
+9
source

The instance sfContextshould automatically be displayed at the level of representation of both $sf_context, so you can: $sf_context->getActionName().

However, I think this may not be the action you are looking for, because I think it could be the processed current action, which, if partial for the component, would be the action of the component. Not 100% on the fact that I never had to use / research :-)

+4
source

All Articles