/** * Sets the properties of #layout_nav template. Checks defined theme options. * note: a binded variable can only be overridden by another binded variable to the same template * * <b>$menu !!</b> - binds the name of the #menu to #layout_nav view, blank by default * * <b>$brand !!</b> - binds the name of the #brand template to #layout_nav, blank by default * * <b>$menu_drawer_template</b> - the #menu-drawer View object if responsive menu is supported, blank otherwise, used in #layout_nav * * <b>$responsive_menu_trigger</b> - the name of the #responsive_menu_trigger template if supported, _kill(ed) otherwise, used in #layout_nav * * <b>$layout_nav_brand_block_class</b> - the brand block class, set to bootstrap grid values by default * * <b>$layout_nav_menu_block_class</b> - the menu block class, set to bootstrap grid values by default * */ function set_layout_nav() { //set block classes //the brand block $this->View->add("layout_nav_brand_block_class", "col-12 col-md-4")->add("layout_nav_menu_block_class", "col-12 col-md-8"); //bind blank values for menu and brand to the #layout_nav //to avoid name clashes $this->View->bind("#layout_nav", array("menu" => "", "brand" => "")); //if primary-menu is not defined _kill the #menu template $this->View->bind("#layout_nav", array("menu" => "_kill")); //if theme doesn't support responsive drawer nav if (!$this->Options->get("wxp_responsive_menu_support")) { //set menu drawer to empty string $this->View->add("menu_drawer_template", "")->add("responsive_menu_trigger", "_kill"); } else { //if theme does support responsive navigation //pass responsive drawer menu template to #layout_nav view $menu_drawer = new View("#menu"); $menu_drawer->set_render_path("#menu", "drawer"); $this->View->add("menu_drawer_template", $menu_drawer); } }