public function gallerymenuAction() { $db = Zend_Registry::get('db'); $gallerySelect = new GalleriesIndex(); $select = $db->select()->distinct()->from('ModuleCategoryViewPage')->join('CategoriesIndex', 'CI_CategoryID = MCVP_CategoryID AND CI_LanguageID = ' . Zend_Registry::get("languageID"))->where('MCVP_ViewID = 9001'); $galleryData = $db->fetchAll($select); $arrayLink = array(); foreach ($galleryData as $gallery) { $link = Cible_FunctionsPages::getPageLinkByID($gallery['MCVP_PageID']); array_push($arrayLink, array('ID' => $gallery['MCVP_PageID'], 'title' => $gallery['CI_Title'], 'link' => $link)); } $pageParentID = Cible_FunctionsPages::findParentPageID(Zend_Registry::get("pageID")); $parentID = 9002; if ($pageParentID['P_ParentID'] == 9016) { $parentID = 9009; } $selectedMenuItem = Cible_FunctionsPages::findMenuID(10, $parentID); $this->view->assign('parentID', $pageParentID['P_ParentID']); $this->view->assign('menuSelectedItem', $selectedMenuItem['MII_MenuItemDataID']); $this->view->assign('arrayLinks', $arrayLink); }