yellowbellys Posted July 23, 2014 Share Posted July 23, 2014 I'd like to change the top menu so the link to the 'home' category, which currently links to my home page, will link to the 'new products' page, but still maintain the dropdown containing all of the product subcategories. Any idea how to do this? Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2014 Share Posted July 24, 2014 remove "home" as category from your menu items, instead of it create own link named "Home" with url to any page you want (in this case with link to new products page) Link to comment Share on other sites More sharing options...
yellowbellys Posted July 24, 2014 Author Share Posted July 24, 2014 remove "home" as category from your menu items, instead of it create own link named "Home" with url to any page you want (in this case with link to new products page) But this won't allow the dropdown menu to pop up upon rollover, will it? Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2014 Share Posted July 24, 2014 that's right, there will be no dropdow with categories so i assume that you want this dropdown, but only change link associated with first menu item? Link to comment Share on other sites More sharing options...
yellowbellys Posted July 24, 2014 Author Share Posted July 24, 2014 that's right, there will be no dropdow with categories so i assume that you want this dropdown, but only change link associated with first menu item? That's right, at the moment the Home category goes to my front page, but I'm able to change the name of the category, but not the link. I'd like to change the link too and have the dropdown still work. Link to comment Share on other sites More sharing options...
yellowbellys Posted July 27, 2014 Author Share Posted July 27, 2014 Any ideas? Link to comment Share on other sites More sharing options...
vekia Posted July 27, 2014 Share Posted July 27, 2014 hello sorry for long waiting time, i missed you reply in this case it's necessary to alter blocktopmenu.php file (located in module directory) there is a code like: if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else $link = $this->context->link->getPageLink('index'); change $link = $this->context->link->getPageLink('index'); to $link = $this->context->link->getPageLink('new-products'); 2 Link to comment Share on other sites More sharing options...
yellowbellys Posted July 27, 2014 Author Share Posted July 27, 2014 hello sorry for long waiting time, i missed you reply in this case it's necessary to alter blocktopmenu.php file (located in module directory) there is a code like: if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else $link = $this->context->link->getPageLink('index'); change $link = $this->context->link->getPageLink('index'); to $link = $this->context->link->getPageLink('new-products'); This makes perfect sense, I've changed it like so: private function generateCategoriesMenu($categories) { $html = ''; foreach ($categories as $key => $category) { if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else $link = $this->context->link->getPageLink('new-products'); It isn't changing on the site, unfortunately! Do I need to do something else in addition to uploading the changed .php file? Link to comment Share on other sites More sharing options...
vekia Posted July 27, 2014 Share Posted July 27, 2014 now it's time to re-save settings in your block top menu page just open top menu configuration page and hit save button (you don't have to change anything, just save settings) 2 Link to comment Share on other sites More sharing options...
yellowbellys Posted July 27, 2014 Author Share Posted July 27, 2014 now it's time to re-save settings in your block top menu page just open top menu configuration page and hit save button (you don't have to change anything, just save settings) Ahh, I just experimented with the cache settings, and deleting the cache worked, I'll remember to just save settings in the module to trigger a clear cache, thanks so much for your help!! Link to comment Share on other sites More sharing options...
vekia Posted July 27, 2014 Share Posted July 27, 2014 you're welcome :-) topic marked as solved. with regards, Milos 1 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