I’m still a relative newcomer to Zend Framework, so please forgive me if this is a stupid question!
I’m using the breadcrumbs view helper in my application’s main layout to provide the usual breadcrumb functionality. However I really need the breadcrumbs to contain the parameters passed to the actions that user has clicked on…
So if you click through from “/controller/parent/id/1” to “/controller/child/id/2” the breadcrumb on the child page should link back to “/controller/parent/id/1” rather than just “/controller/parent/”
What are my options? Do I need to build my Zend_Navigation tree with the entire contents of my database, so that every possible ID for every action is catered for? Or can I write my own helper to add the extra parameters to the Zend_Navigation_Page object when the breadcrumbs are rendered?
The first option seems to be the path of least resistance, but feels very inefficient! Although, I suppose this could be done with lazy loading to cut down on memory usage.
Thanks for any help!
Tom
I think the answer is to use the reset_params inside your navigation.xml
Inside your page you need to set reset_params = 0 like this:
See: http://framework.zend.com/manual/en/zend.navigation.pages.html
For example on our application we use something like this: