phm2000 Posted June 20, 2013 Share Posted June 20, 2013 Hello On menu, I inser a cms category witch contain cms subcategory and pages. It look like this. cms category link okcms sub category no link (only #)page 1 link ok page 2 link ok My cms subcategory appears but without link to itself. When I click on a page I can see the link to cms subcategory on the breadcrumbs. My question : how can I modifiy the blocktomenu.php file in the folder modules/blocktopmenu to create the missing link. I found the code where it seems to be but I don't know how to modify it. It begins at line 660, I suppose I have to modify the lines after : foreach ($categories as $category) private function getCMSMenuItems($parent, $depth = 1, $id_lang = false) { $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; if ($depth > 3) return; $categories = $this->getCMSCategories(false, (int)$parent, (int)$id_lang); $pages = $this->getCMSPages((int)$parent); if (count($categories) || count($pages)) { $this->_menu .= '<ul>'; foreach ($categories as $category) { $this->_menu .= '<li>'; $this->_menu .= '<a href="#">'.$category['name'].'</a>'; $this->getCMSMenuItems($category['id_cms_category'], (int)$depth + 1); $this->_menu .= '</li>'; } foreach ($pages as $page) { $cms = new CMS($page['id_cms'], (int)$id_lang); $links = $cms->getLinks((int)$id_lang, array((int)$cms->id)); $selected = ($this->page_name == 'cms' && ((int)Tools::getValue('id_cms') == $page['id_cms'])) ? ' class="sfHoverForce"' : ''; $this->_menu .= '<li '.$selected.'>'; $this->_menu .= '<a href="'.$links[0]['link'].'">'.$cms->meta_title.'</a>'; $this->_menu .= '</li>'; } $this->_menu .= '</ul>'; } } Can someone help me please. Prestashop 1.5.4.1 Link to comment Share on other sites More sharing options...
phm2000 Posted June 27, 2013 Author Share Posted June 27, 2013 Hello I don't find how to create the link to the cms subcategory. Is it a prestashop bug ? Thanks Link to comment Share on other sites More sharing options...
Scott J Posted March 31, 2016 Share Posted March 31, 2016 Still same behavior in 1.6.3 I thought that more people would be discussing this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now