Zf2 Naviagation 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

 
 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org