views:

77

answers:

1

I have a top navigation and a side one

Home | Tours  | Booking

Tour1
------
Tour2
------
Tour3

I show the side menu depending on a active top item. But sometimes when the side menu item is clicked I have to show that items children instead of the sidemenu. When no children exist I just show Children of a top menu depending on the active item. I an really having difficulties implementing that kind a logic and any help would be appreciated.

//Comment button is not working so I will add comments here After stumbling the zend navigation view helpers, I am coming to the point - Understanding the concept of how in zend V part of MVC is implemented can save someone who is new to the framework many hours. As said in the answer to this question - "Use what is available", thought first we have to know where to find what is already available out there - that is where comes handy to take a look at the concept of helpers and so forth.

A: 

You should check out examples #34 - 44, specifically #36.

Travis
thanks probably you right just using a existent view helper should solve it. First I was kind a rendering two different menus but faced a difficulty to distinguish which is child of which branch and so on... thanks
simple
I try to make it a habit of using what is available in the Framework already. There's no point in reinventing the wheel.One of the better documented components in the Framework is Zend_Navigation, and it is extremely flexible. Almost every scenario I've ever needed, can be found in what already exists.
Travis