By default, if an attribute is set to Use in Layered Navigation > Filterable (with results), then this attribute will be shown on layered nav's of all categories /attribute-sets that use this attribute.

How do you control an attribute to Use in layered navigation, but only for certain categories or attributes sets where this attribute is used?

Any idea of an extension or mySql query that can manipulate this?

1 Answer 1


I had a similar problem and used this method to hide certain attributes on specific pages:

Open /app/design/frontend/base/default/template/catalog/layer/view.phtml


<dt><?php echo $this->__($_filter->getName()) ?></dt>
<dd><?php echo $_filter->getHtml() ?></dd>

Replace with:

<?php $tmpTitle = $this->htmlEscape($this->__($_filter->getName()));
$tmpTitle = strtolower($tmpTitle);
$tmpTitle = preg_replace("/[\s]+/", "-", $tmpTitle);
$tmpTitle = str_replace("/", "-", $tmpTitle);
<span class="<?=$tmpTitle?>">
 <dt><?php echo $this->__($_filter->getName()) ?></dt>
 <dd><?php echo $_filter->getHtml() ?></dd>

The first part takes the “title” of the attributes (set in the Manage Attributes section in the backend) and changes the “title” to lower case and places “-” in place of spaces (in case your attribute name is more than 1 word). The second part then injects the $tmpTitle variable as a “class” tag for use with some CSS magic!

Add To you Category Description:

<style type="text/css">
.block-layered-nav .your-attribute-label { display: none; } 

Hope this helps.

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.