views:

18

answers:

1

i am reading up on zend navigation and was wondering whats good way to set it up.

Where do i setup up? can i do it using application.ini - but it may make application.ini too long to read. maybe using a resource method? maybe a plugin?

do i hardcode all pages? eg.

$pages = array(
  array(
    'label' => 'Home',
    'title' => 'Home page title',
    'controller' => 'index',
    'action' => 'index'
  ),
  array(
    'label' => 'Blog',
    'title' => 'Blog',
    'controller' => 'index',
    'action' => 'blog',
    'pages' => array(
      array(

in a dynamic site it seems smarter to generate this database, eg. child pages of blog will be generated from blog categories? except i want to only do it once? maybe i must cache it? i must make sure tho that if new categories were added, the navigation also updates.

A: 

To make it so you can add new pages from a CMS ex. Would I have put this in your database model. The Zend to create a function to return an array of categories and pages. Ex.

$Tools->GetTreeOfPagesAndCategories();
sv88erik