How can I get the action name inside a template? The template is actually a partial.
You should try :
$sf_params->get('action')
The sfContext
instance should be automagically exposed in the view layer as $sf_context
so you could do: $sf_context->getActionName()
.
However i think this may not necessarily be the action youre looking for, because i think it may be the current action being processed which if its a partial for a component would be the component's action. Not 100% on that as ive never had a need to use/investigate :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With