Skip to main content
4 of 5
added 1 character in body
Baby in Magento
  • 3k
  • 16
  • 84
  • 223

Hide single attribute value under Layered navigation

please visit this link : http://hotwheelstoys.in/mobileapp/boys-toys.html

at the left side you can see "SHOP BY" , below that "CHARACTAR".

below dropdown values. here i want to hide the last dropdown "Hawkeye"

I dont want to delete it from backend. but i want to hide this.

if this attribute option have more than one ,than also i want to hide it. all i need is i want to hide one attribute option.

app/design/frontend/base/default/template/em_layerednavigation/view.phtml

<?php
/**
 * Category layered navigation
 *
 * @see Mage_Catalog_Block_Layer_View
 */
?>
<?php if($this->canShowBlock()): ?>
<div class="block block-layered-nav">
    <div class="block-title">
        <strong><span><?php echo $this->__('Shop By') ?></span></strong>
    </div>
    <div class="block-content">
        <?php if($this->canShowOptions()): ?>
            <p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
            <dl id="narrow-by-list">
                <?php $_filters = $this->getFilters() ?>
                <?php foreach ($_filters as $_filter): ?>
                <?php if($_filter->getItemsCount()): ?>
                    <dt>
                        <?php echo $this->__($_filter->getName()) ?>
                        <?php if ($removeUrl = Mage::helper('layerednavigation')->getRemoveUrl($_filter)): ?>
                            <a class="btn-remove" href="<?php echo $removeUrl ?>" title="<?php echo $this->__('Clear All') ?>"><?php echo $this->__('Clear All') ?></a>
                        <?php endif ?>
                    </dt>
                    <dd><?php echo $_filter->getHtml() ?></dd>
                <?php endif; ?>
                <?php endforeach; ?>
            </dl>
            <script type="text/javascript">decorateDataList('narrow-by-list')</script>
        <?php endif; ?>
    </div>
</div>
<?php endif; ?>
Baby in Magento
  • 3k
  • 16
  • 84
  • 223