Jump to content

[SOLVED] how to modify Top horiontal menu subcategories


Recommended Posts

Hi there!

It is, unfortunately, harder than it seems!

Usually, you can achieve the multi-column result by adding several left-floated UL tags. The problem is, all the code for the module is generated in blocktopmenu.php!

 

You have to modify its getCategory method to do it, but it's really hard to be able to guide you from a simple forum post ;)

Link to comment
Share on other sites

Yes, but this way they are not exactly columns as elements are placed like:

 

item 1 - item 2

item 3 - item 4 

 

Rather than

 

item 1 - item 3

item 2 - item 4

 

But if he's okay with it, why not! :)

 

In addition, he will have to add a solid background to the ul element, to prevent weird shadows and li floating unequally :)

Link to comment
Share on other sites

 

hmm and what with css styles? i think that it is able to do it with css only

 

example:

YxGTrT8.png

 

 

i just changed width from auto to 403px in:

.sf-menu li:hover ul, .sf-menu li.sfHover ul {
left: 0;
top: 34px;
z-index: 99;
width: 403px;
}

 

Thank you, I think that's what I want :)

 

I'll try it and then tell you it was well.

Link to comment
Share on other sites

Hi there!

It is, unfortunately, harder than it seems!

Usually, you can achieve the multi-column result by adding several left-floated UL tags. The problem is, all the code for the module is generated in blocktopmenu.php!

 

You have to modify its getCategory method to do it, but it's really hard to be able to guide you from a simple forum post ;)

 

Hi I just want a simple function to divide the columns.

 

Something more complicated is better and easier to buy a ready-made module.

 

 

Edited: website image removed

Edited by xkilo (see edit history)
Link to comment
Share on other sites

 

hmm and what with css styles? i think that it is able to do it with css only

 

example:

YxGTrT8.png

 

 

i just changed width from auto to 403px in:

.sf-menu li:hover ul, .sf-menu li.sfHover ul {
left: 0;
top: 34px;
z-index: 99;
width: 403px;
}

 

 

Thank you worked fine ;)

Link to comment
Share on other sites

  • 1 year later...

Hi, I know this is an old post but it describes exactly what I want to do. I have some subcategories with many sub-sub-categories and I want to split a column into 2-3 columns. I tried to modify the css as you said but I can't find this code line, maybe because I use prestashop 1.6 and it's different. Any suggestions on how to do it? If it's possible with just some css modifications I would prefer that than changing the module code.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...