Using following controller:
class mydvbController extends Zend_Controller_Action
{
public function indexAction()
{
}
public function careerAction()
{
}
public function naviAction()
{
}
}
And following view scripts – index.phtml:
<?php echo $this->action('navi', 'mydvb'); ?>
Some stuff.....
and career.phtml:
<?php echo $this->action('navi', 'mydvb'); ?>
Some other stuff.....
I would like to get the name of the action in naviAction(), depending on which action called the action view helper (in my example index or career). There is of course the possibiliy to pass it in parameter, like this:
<?php echo $this->action('navi', 'mydvb', null, array('actionName' => $this->naviAction)); ?>
But doing this that way means I have to pass the action name from every action to its view and from the view as a parameter to the action view helper. I wonder if there is simplier way to get the name of the action from inside the action view helper.
Wouldn’t it be easier in your case to just get the action name from the request?