Zf2 Navigation Custom Active Page

October 31, 2015

Zf2 Naviagation Custom Active Page
Call in layout/view

$nav = $this->navigation('Navigation');
$pages = $nav->getContainer()->getPages();
foreach ($pages as $page) {
    if ($page->getId() == 'admin') {
            $page->setActive(true);
    }
}

tags: ,
posted in how to ?, Uncategorized, Zend Framework 2 by Ivan Gospodinow

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /home/c2kblate/sites/ivangospodinow.com/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048
 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org