What I'm trying to do is put two dynamic navigation menus in my CakePHP layout (default.ctp). The main menu should have several levels (with the possibility of a drop-down list). The secondary menu is the one that shows the drop-down contents of the main menu in the left sidebar.
I read the CakePHP documentation, but I am confused about how to put these menus in the layout. I know that you have 4 different parts at the presentation level (as described in http://book.cakephp.org/2.0/en/views.html ):
- view
- the elements
- layouts
- Assistants
But with the knowledge that I have now, I think that none of these parts can be used to satisfy my needs. The navigation menu is the part you only load ONES in the layout, so it is not an element or helper. So what is the best practice ...
- ... where to create a menu tree?
- ... where / how is its echo in the layout file?
Can someone clear my problem? Thanks in advance!;)
source
share