2

Is it possible to collapse all filters on layered navigaton and if so how?

Currently half of our filters are collapsed and some are open such as colour and category by default

How do we collapse and open filter programatically?

2 Answers 2

1

go in the file

/app/design/frontend/{yourpackage}/{yourtheme}/template/catalog/layer/view.phtml

add anchor an element DT

<dt><a href="/"><?php echo $_filter->getName() ?></a></dt>

paste add the following code in the bottom of view.phtml

<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery("dl#narrow-by-list> dd:not(:first)").hide();
jQuery("dl#narrow-by-list> dt a").click(function(){
jQuery("dl#narrow-by-list> dd:visible").slideUp("fast");
jQuery(this).parent().next().slideDown("fast");
return false;
});
});
/* ]]> */
</script>
-1

Remove class "open" from line no.41

<div class="block-content toggle-content open">
yourpackage/theme/template/catalog/navigation/left.phtml. 

........... ...........

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.