/** * menu * Create the menu * @param string $menucls - main CSS class */ public function webmenu($menucls = "") { $this->translator = Shineisp_Registry::get('Zend_Translate'); $NS = new Zend_Session_Namespace('Default'); if (!empty($NS->customer)) { $this->view->user = $NS->customer; } // Get the store categories product $categories = ProductsCategories::getMenu(); $storecategories = $this->storeCategoriesMenu($categories, 0); // Create CMS pages menu $cmsmenu = '<li class="dropdown"><a data-toggle="dropdown" href="">' . $this->translator->translate('Blog') . '</a>' . $this->createMenu(0) . "</li>"; // Create the tlds list menu $tldmenu = $this->createTldMenu(); // Delete the last </ul> in the list $storecategories = substr_replace($storecategories, "", -5); // Replace the header of the menu list $storecategories = substr_replace($storecategories, $tldmenu . $cmsmenu, 0, strlen("<ul class=''>")); // we will send the body of the bullet list to the partial template $this->view->menu = $storecategories; $this->view->menucls = $menucls; return $this->view->render('partials/webmenu.phtml'); }
public function getall() { $this->authenticate(); return ProductsCategories::getMenu(); }