Jump to content
MusikMachineMan

BLOCKTOPMENU category buttons link to homepage

Recommended Posts

Dear all,

i'm dealing with an issue while using the Blocktopmenu module.

 

Explainations :

i used to have lots of categories and no sub-cat,

most of all the categories were listed in the blocktopmenu with link to the good place and a useful name.

 

while there were quite lots of categories there were almost 3 lines in the menu, i noticed it would be more efficient by editing sub-categories.

 

I so did changes to make this better, and now have less categories in only 1 line which is great. :-)

and the sub cats do appear correctly when hovering over each button, but...

 

i see that each "top" category button links to the homepage of the website and not to the category page (while this works well for the sub category appearing) and i can't see where to fix this :-(

 

Does anybody would have an idea to solve this ?

 

I still have products listed in these categories and that do not enter in a sub,

i guess it could be possible to reach these category pages without passing by the listing in the footer

 

many many thanks by advance

regards

Share this post


Link to post
Share on other sites

Go to the modules/blocktopmenu directory :

 

$menu variable will render into blocktopmenu.tpl file that is called by the blocktopmenu.php.

In the blocktopmenu.php make search for the makemenu() method that will generate topmenu for header.

 

$this->makeMenu();

  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much Sandip Chandela,

i was already checking in this blocktopmenu.php but unfortunately i'm not that familiar with coding,

i was rather looking for a <a href and i must confess i don't know how to fix this $this->makeMenu(); stuff :(

could you tell me more about the way i must follow ?

 

cheers man

Share this post


Link to post
Share on other sites

better to see blocktop menu that may have blank url.

See module listing from admin panel and then go to the blocktopmenu module. 

or else have you used any third party module for that functionality.?

 

can you share your url pls ? 

Share this post


Link to post
Share on other sites

replace in blocktopmenu.php

$html = '';

        foreach ($categories as $key => $category) {
            if ($category['level_depth'] > 1) {

with:

$html = '';

        foreach ($categories as $key => $category) {
            if ($category['level_depth'] > 0) {

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More