Posted By

jiewmeng on 07/23/10


Tagged

zend-framework


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

osirisinternet
piotrlewandowski


Zend Framework: Setup Zend Navigation


 / Published in: PHP
 

  1. // bootstrap.php
  2. function _initNavigation() {
  3. require_once 'configs/navigation.php';
  4. $container = new Zend_Navigation($pages);
  5.  
  6. $this->bootstrap('view');
  7. $view = $this->getResource('view');
  8. $view->navigation($container);
  9.  
  10. return $container;
  11. }
  12.  
  13. // navigation.php
  14. $pages = array(
  15. 'label' => 'Learning Zend Framework',
  16. 'controller' => 'index',
  17. 'pages' => array(
  18. 'label' => 'Home',
  19. 'controller' => 'index'
  20. ),
  21. 'label' => 'Blog',
  22. 'controller' => 'blog'
  23. ), ...
  24.  
  25. // application.ini
  26. resources.view[] =
  27.  
  28. // layout.phtml
  29. echo $this->navigation()->breadcrumbs();

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: postNuKe on June 8, 2011

View this code too

You need to login to post a comment.