Thursday, February 7, 2008

Navigation Helper The Best of!

If you want get code like this:


You can use useful ;) helper - Navigation Helper!
Code like this:
link('My account',"/users/account/",array('activeAction'=>'account'))?>
link('Browse',"/items/browse/",array('activeAction'=>'browse'))?>
link('Create Item',"/items/add/",array('activeAction'=>'add','activeController'=>'items'))?>
link('Create Item',"/users/add/",array('activeAction'=>'add','activeController'=>'users'))?>
So... When user travel into your site and change /items/add -> users/add - the different menu be displayed (class = "active" I mean).
Just add code like thisrender(null,array('id'=>'main_nav'))?>
In your views! ;-)
Easy Way? Yes! Easy!
You can find more detail information here. And download navigation helper (sorry it's not direct link, because this file present in other blog).

No comments: