How to create "Dynamic" Breadcrumbs in Zend Navigation

Jiew Meng picture Jiew Meng · Jan 30, 2011 · Viewed 7.2k times · Source

With Zend_Navigation, I can do something like

Home > Projects > Collaborators

but What if I want something more useful

Home > Project name > Collaborator name

How can I acheive this? Is it a good idea? Possibly, there would be performance issues? Cos it got to query up the hierarchy? But whatever it is, how can I achieve this?

Answer

Ashley picture Ashley · Jan 30, 2011

Example #34 shows you how to use a view partial for breadcrumbs. I'd do a foreach on $this->pages and adjust where needed

http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.navigation.breadcrumbs