Post by erebus » Thu May 15, 2014 3:23 pm

Some skins have all sub-categories expanded by default.

The default skin expands sub-categories on-click, a useful thing when you have
a lot of sub-categories. The way it is doing it is through the css stylesheet
but it does it in a bit cryptic way through inherited properties.

After hours of experimenting with the stylesheet I decided to alter the
code a bit and finally go to bed! ;D

Here is what I did, I hope you find it useful:

go to directory
catalog/view/theme/*skin_name*/template/module

and edit
category.tpl

and find near line 13

Code: Select all

<?php if ($category['children']) { ?>
then replace it with

Code: Select all

 <?php if ($category['children'] && $category['category_id'] == $category_id) { ?>
This will do the work. The extra argument is true when a category is active (clicked).

Happy coding!! :crazy:

Newbie

Posts

Joined
Thu May 15, 2014 3:06 pm
Who is online

Users browsing this forum: No registered users and 6 guests