Jump to content

How can I edit to top horizontal menu without subcategories?


Oktay

Recommended Posts

In your picture i don't see any horizontal menu! all i see is the footer!

can you tell if you mean the footer? and if it is the foooter which part exactly as you site is not in englihs and i don't understand your language.

if you mean the tophorizontal menu which is at the top of your page, then can you make a screenshot of it and tell exactly what do you want.

 

thank u

Link to comment
Share on other sites

walidon - This is the top menu with main category binded to first menu item. If you have a lot of categories/subcategories this happens when menu item expands.

 

Oktay - I've got the same problem. You can not edit list of subcategories or create a custom list with choosen subcategories. This new top menu is great but it lacks of configuration options eg. to display only one level of subcategories from parent category or create items with custom submenus.

 

You can display only one level of subcategories by editing modules/blocktopmenu/blocktopmenu.php at line ~461. It's far from perfect but maybe it will work for you.

There are cons with this quick fix. Remember that every time this module updates you will lost these changes.

private $depthMax = -1;   // A placeholder for current menu item depth
private $depthLevels = 1; // Max depth to go to from main item

private function generateCategoriesMenu($categories)
{
    $html = '';
    foreach ($categories as $key => $category)
    {
        if ($this->depthMax < 0)
        {
            $this->depthMax = (int) $category['level_depth'] + $this->depthLevels;
        }

        if ($category['level_depth'] > $this->depthMax)
            continue;

// Edit: I didn't noticed vekia reply. His solution is neater.

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

Hi Walidon,

 

Primarily, thanks for answer.

 

That's not footer. That is top horizontal menu (sorry, or block top menu). I have a lot of subcategories and few category is disappering. I want to show only the main category. 

 

check links that i attached above.

there is a solution which will not affect SEO.

  • Like 1
Link to comment
Share on other sites

Hi Vekia, Thanks

 

your solution is work. I've added the code and it works perfectly. However this solution is not showing minic category photos. If you want, you can see my site. In terms of visuals, the photo is very important.

 

 

http://www.birincitercihim.com/underc/index.php?live_configurator_token=262abc9b3ef7eec159315792c0717a4f&id_shop=1&id_employee=1

Link to comment
Share on other sites

Hi Vekia, Thanks

 

your solution is work. I've added the code and it works perfectly. However this solution is not showing minic category photos. If you want, you can see my site. In terms of visuals, the photo is very important.

 

 

http://www.birincitercihim.com/underc/index.php?live_configurator_token=262abc9b3ef7eec159315792c0717a4f&id_shop=1&id_employee=1

 

and where these pictures should appear?

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...