title: Multiselection in Layered navigation In Magento
body: <p>In layered navigation, when i select particular attribute, it gets disappeared from left side selection panel, so I want I should be able to select more than once.
  If I come to know from what collection it is coming, that will be helpful.</p>
  
  <p>-Thanks in Advance.</p>
  
  <pre><code>public function apply(Zend_Controller_Request_Abstract $request, $filterBlock) {
      $filter = $request-&gt;getParam($this-&gt;_requestVar);
      if (is_array($filter)) {
          $text = array();
          foreach ($filter as $f)
              array_push ($text, $this-&gt;_getOptionText($f));
              if ($filter &amp;&amp; $text) {
              $this-&gt;_getResource()-&gt;applyFilterToCollection($this, $filter);
              $this-&gt;getLayer()-&gt;getState()-&gt;addFilter($this-&gt;_createItem($text, $filter));
              $this-&gt;_items = array();
          }
          return $this;
      }
      $text = $this-&gt;_getOptionText($filter);
      if ($filter &amp;&amp; $text) {
          $this-&gt;_getResource()-&gt;applyFilterToCollection($this, $filter);
          $this-&gt;getLayer()-&gt;getState()-&gt;addFilter($this-&gt;_createItem($text, $filter));
          $this-&gt;_items = array();
      }
      return $this;
  }
  
  
  public function applyFilterToCollection($filter, $value)
  {
      $collection = $filter-&gt;getLayer()-&gt;getProductCollection();
      $attribute  = $filter-&gt;getAttributeModel();
      $connection = $this-&gt;_getReadAdapter();
      $tableAlias = $attribute-&gt;getAttributeCode() . '_idx';
       if (!is_array($value)) {
          $conditions = array(
          "{$tableAlias}.entity_id = e.entity_id",
          $connection-&gt;quoteInto("{$tableAlias}.attribute_id = ?", $attribute-&gt;getAttributeId()),
          $connection-&gt;quoteInto("{$tableAlias}.store_id = ?", $collection-&gt;getStoreId()),
          $connection-&gt;quoteInto("{$tableAlias}.value = ?", $value)
      );
       }else{
  
           $conditions = array(
          "{$tableAlias}.entity_id = e.entity_id",
          $connection-&gt;quoteInto("{$tableAlias}.attribute_id = ?", $attribute-&gt;getAttributeId()),
          $connection-&gt;quoteInto("{$tableAlias}.store_id = ?", $collection-&gt;getStoreId()),
          $connection-&gt;quoteInto("{$tableAlias}.value in (?)",$value)
      );
       }
  
      $collection-&gt;getSelect()-&gt;join(
          array($tableAlias =&gt; $this-&gt;getMainTable()),
          implode(' AND ', $conditions),
          array()
      );
  
      //echo $collection-&gt;getSelect();
  
      return $this;
  }
  </code></pre>