$this->pageId = $this->_catid;
}
$this->_navigationFactory->setGateway($this->_pageGateway);
+ // mainNav is the mobile navigation output
$this->mainNav = $this->_getMainNav($this->_catid);
+ // sideNav output
$this->sideNav = $this->_getSideNav($this->_catid);
+ // main Navigation output
+ $this->mainNavigationUl = $this->_getMainNavigation();
$this->newsletterAction = Toolkit_Template_Page::getSeoUrl(
$this->_pageGateway, 10
*
* @param type $catid page catid
*
- * @return type
+ * @return string
*/
private function _getMainNav($catid)
{
return ($html) ? $html : '';
}
+ /**
+ * Returns the main level navigation and all the subs
+ * Locked down to a few top levels
+ *
+ * @return string
+ */
+ private function _getMainNavigation()
+ {
+ if (defined('MAIN_LEVEL_NAV_ARRAY') && MAIN_LEVEL_NAV_ARRAY) {
+ $mainNavArray = unserialize(MAIN_LEVEL_NAV_ARRAY);
+ }
+ $sideNav = new Toolkit_Template_Navigation_AllInOneSideNav(
+ $this->_pageGateway
+ );
+ $nav = $sideNav->getNavigation();
+ $newNav = array();
+ foreach ($nav as $key => $item) {
+ if (in_array($item['id'], $mainNavArray)) {
+ $newNav[] = $item;
+ }
+ }
+ $html = $this->_arrayToListHTML($newNav, 0, 'clearfix');
+ return ($html) ? $html : '';
+ }
+
/**
* _arrayToListHTML
*
}
$securePagesArray = array();
define('SECURE_PAGES', serialize($securePagesArray));
+$mainNavigationUl = array(2,7,10,11);
+define('MAIN_LEVEL_NAV_ARRAY', serialize($mainNavigationUl));
$nonMobilePagesArray = array();
define('NON_MOBILE_PAGES', serialize($nonMobilePagesArray));
/**
</form>
</div>
<nav class="clearfix hide-for-small-only">
- <ul class="clearfix sf-menu">
- <li>
- <a href="{baseURLDefined:h}departments-2/">Departments</a>
- </li>
- <li>
- <a href="{baseURLDefined:h}documents-7/">Documents</a>
- </li>
- <li>
- <a href="{baseURLDefined:h}calendars-10/">Calendars</a>
- </li>
- <li>
- <a href="{baseURLDefined:h}contact-11/">Contact</a>
- </li>
- </ul>
+ {mainNavigationUl:h}
</nav>
</div>
</div>
<a href="{getToolboxUrl(#21#):h}">Recreation Department</a>
<i>(906) 298-0333</i>
<a href="mailto:recdept@cityofmi.org">recdept@cityofmi.org</a>
- </div>
+ </div>
</div>
<div class="small-6 medium-3 large-3 columns data-equalizer-watch">
<div>