Creating breadcrumbs with Zend Framework is really easy:
- Create a menu structure (ini file, php array, …)
- add a small peace of code in the view file: “echo $this->navigation()->breadcrumbs()”
- open your page and you see… nothing
This is what happened to me on the home page of my most recent project. All though the ZF manual indicates you just have to echo the breadcrumbs, nothing appeared.
The problem was this: my menu started at level zero, and ZF sets the minimum level that will be displayed to one. Luckily there is the documentation, but it is really annoying that the method “setMinDepth()” is not in the API, so it took me much longer to find out this method existed.