Latest |Kites |Pictures |Programming |Life
[filed under Programming]Zend Framework actionStack

Further notes on Zend Framework Menu Navigation

This is how you pass variables to another action on the actionStack:

$this->_helper->actionStack('application', 'menu', 'default', array('show_menu'=>$this->getRequest()->action));

Then in your menu controller, ApplicationController::menuAction you can:

$show_menu = $this->_getParam( 'show_menu' );

Then you can use this variable to highlight the correct menu item, e.g:

<ul>
  <li>menu 1</li>
  <li id="selected">menu 2</li>
  <li>menu 3</li>
</ul>

 

10th of September, 2008@10:07:44 AM
1 comments, permanent link to article

Comments

[13th of Nov, 2008 @ 07:51 AM]
Gerard said:
Thanks again.

Check this if you are a human being. Thanks. (I'm trying to reduce my comment spam :-)

Comment

Server Grind [0.0032 seconds]