Search code examples
zend-frameworkzend-navigation

How to create "Dynamic" Breadcrumbs in Zend Navigation


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?


Solution

  • 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