Removing category popout menus

Searched everywhere but still cannot find it.



Is it possible to stop the popout menus showing from the main page.



I have a few categories and some of those have lots of sub-categories.

Hover over the main category and up pops the sub-categories list which is too long to scroll up and down.

It would be better if that popup did not work, instead they had to click on the main category to load the page which has all the sub-categories listed.



Any ideas please.

Remove subcategories from category menu, compatible with v2.2.3:



Open /skins/yourtheme/customer/views/categories/components/menu_items.tpl



Replace:


```php {* $Id$ *}

{strip}

{assign var=“foreach_name” value=“cats_$cid”}

{foreach from=$items item=“category” name=$foreach_name}


  • {if $category.subcategories}

      {include file="views/categories/components/menu_items.tpl" items=$category.subcategories separated=true submenu=true cid=$category.category_id}

    {/if}
    {$category.category}

  • {if $separated && !$smarty.foreach.$foreach_name.last}
  •  

  • {/if}
    {/foreach}
    {/strip} ```

    With:
    ```php {* $Id$ *}
    {strip}
    {assign var="foreach_name" value="cats_$cid"}
    {foreach from=$items item="category" name=$foreach_name}

  • {$category.category}

  • {if $separated && !$smarty.foreach.$foreach_name.last}
  •  

  • {/if}
    {/foreach}
    {/strip} ```

    This removes the check and display for subcategories, therefore only the top level category will appear in your menu.

    [quote name='StellarBytes' timestamp='1320253873' post='125198']

    Remove subcategories from category menu, compatible with v2.2.3:



    Open /skins/yourtheme/customer/views/categories/components/menu_items.tpl



    Replace:


    ```php {* $Id$ *}

    {strip}

    {assign var=“foreach_name” value=“cats_$cid”}

    {foreach from=$items item=“category” name=$foreach_name}


  • {if $category.subcategories}

      {include file="views/categories/components/menu_items.tpl" items=$category.subcategories separated=true submenu=true cid=$category.category_id}

    {/if}
    {$category.category}

  • {if $separated && !$smarty.foreach.$foreach_name.last}
  •  

  • {/if}
    {/foreach}
    {/strip} ```

    With:
    ```php {* $Id$ *}
    {strip}
    {assign var="foreach_name" value="cats_$cid"}
    {foreach from=$items item="category" name=$foreach_name}

  • {$category.category}

  • {if $separated && !$smarty.foreach.$foreach_name.last}
  •  

  • {/if}
    {/foreach}
    {/strip} ```

    This removes the check and display for subcategories, therefore only the top level category will appear in your menu.
    [/quote]


    You're a hero. Works perfect, many thanks.

    [quote name='mr_mog' timestamp='1320254392' post='125200']

    You're a hero. Works perfect, many thanks.

    [/quote]

    No problem, this is a permanent change which, if you wish to show subcategories in future, you will have to revert to the default version of menu_items.tpl.



    Alternatively, this may not be what you're looking for, but might be a better way to display the categories list in your circumstances.



    Design > Blocks > All Pages



    Edit the 'Categories' block and set the Filling to Dynamic, then Save.



    On the frontend of your site, the category list will display the main categories. Once you click on a category, the page will take you to that category, but the category menu will now display your root category as well as the subcategories of the category you are in.



    Might not be useful in your case, but worth a bash!