Monday, June 20, 2011

[ZF] Hiding navigation elements

If you're building an XML file to create a menu/breadcrumb/sitemap and wish to hide elements from, let's say, the menu, here is what you can do:
Add <visible>0</visible> to your node

You can then use the usual <?php echo $this->navigation()->menu(); ?> to generate your menu.

Also note that making a node invisible will make all its children invisible as well. Duh.

No comments:

Post a Comment