background preloader

Zend_Navigation

Facebook Twitter

Comment utiliser les menus automatique dans le Zend Framework. Zend Framework navigation with breadcrumbs. It’s been a while since I last time played with beauty of Zend Framework.

Zend Framework navigation with breadcrumbs

Each time I check new features it seems to me that the things are more simplier than the last time, I might be wrong (I wouldn’t bet on that) or I’m just getting better Let’s check this piece of cake – how you can create navigation with breadcrumbs in Zend Framework project. As many things in Zend Framework you can get same features in different ways, so the same thing goes with the Zend_Navigation class.

First of all you need to decide which way you will choose: - navigation with xml setup file or - from application.ini file I suggest you to try both ways and then choose the one you like most, I’ll show you the both ways. In Boostrap.php class you need to initialize your navigation. - xml way tells where your navigation.xml file is: - or in “config” way from application.ini file you simply tell your Bootstrap class which part needs to be processed: For desert you can add breadcrumbs into same file like this:

Zend_Navigation – creating a menu, a sitemap and breadcrumbs. This tutorial covers a lot of the basic use cases with Zend_Navigation.

Zend_Navigation – creating a menu, a sitemap and breadcrumbs

Using a uri-based navigation.xml file, we generate a very simple menu system as well as a breadcrumb with some basic information. In the last 3 minutes I cover how to get a Google compliant sitemap from the navigation.xml file. This video is by no means exhaustive, but should get you up and running with Zend_Navigation in the Zend Framework. Browse the code off google code or download a zip here. On another note, I’m thinking of putting together a forum as a way of organizing some of the informative discussion I’ve found in the comments section.

Alternatively, if you have topics you’d like covered and are willing to step up to the mic, I’d love to share your own screencasts with the now over 550 subscribers! Description This tutorial covers a lot of the basic use cases with Zend_Navigation. Tags breadcrumbs, menu, sitemap, zend_navigation Related. Zend_Navigation Tricks: True tab navigation with sub menus – Part 1. Posted: 16th August 2009 by Grant Perry in Zend Framework Tags: navigation, tabs, Zend_Navigation It is some what tricky with the Zend_Navigation menu helpers to set up your typical tab-based navigation with sub pages relevant to the tab your on, as seen below.

Zend_Navigation Tricks: True tab navigation with sub menus – Part 1

But it’s not far difficult so don’t be put off, hopefully the view helpers will improve over time. In the mean time this is a 3 part series in achieving the navigation I set up in utilitiesman.com as seen above. Part 1: Setting up the navigation, and rendering the tabs. Set up your navigation configuration, I’ve done this in xml. < ? In your bootstrap file you’ll need setup the navigation and load your navigation config: $navigationConfig = new Zend_Config_Xml('. Assuming you’re making use of the Zend_Layout this would go in your template $this->navigation()->menu()->setPartial(array('nav1.phtml','default'));echo $this->navigation()->menu()->render(); <ul id="nav1"><li><a ...