Sunday, August 30, 2009

INTEGRATING NAVIGATION WITH THE TREE

I had some issues with Zend_Navigation that I could not work around. It provides tons of functionality, but is difficult to extend.
The following were key requirements:
  • It had to be easier to create custom page types
  • Less verbose, simpler site tree (though the CMS will be doing this)
After many tries i settled on a fairly simple approach that gives us the flexibility to have our way with navigation, but still uses the core Zend_Navigation component as much as possible. This enables you to use the standard Zend_View navigation helpers.

Basically it works like this: The site resource loads an XML site tree which it registers with Digitalus Core. Then the navigation resource fetches the tree's pages, builds the navigation object, and registers each of the pages with the front controller router as static routes.

No comments:

Post a Comment