title: Magento - Set category in layered navigation
body: <p>Whenever I search a product using the search box, on the left side there is a filter by category. The code that creates this filter is this one:</p>
  
  <pre><code>&lt;dl id="narrow-by-list"&gt;
    &lt;?php $_filters = $this-&gt;getFilters() ?&gt;
    &lt;?php foreach ($_filters as $_filter): ?&gt;
      &lt;?php if($_filter-&gt;getItemsCount()): ?&gt;
        &lt;?php if($_filter-&gt;getName() != "Category"){ ?&gt;
          &lt;dt&gt;&lt;?php echo $this-&gt;__($_filter-&gt;getName()) ?&gt;&lt;/dt&gt;
          &lt;dd&gt;
            &lt;?php echo $_filter-&gt;getHtml() ?&gt;
          &lt;/dd&gt;
        &lt;?php } endif; ?&gt;
    &lt;?php endforeach; ?&gt;
  &lt;/dl&gt;
  </code></pre>
  
  <p>This shows only the main category in the filter, and I'd like to show its subcategories. I tried to set another category programmatically with this code:</p>
  
  <pre><code>&lt;?php
       $layer = Mage::getSingleton('catalog/layer');
       $_categ = Mage::getModel('catalog/category')-&gt;load(5);
       $layer-&gt;setCurrentCategory($_categ);
  ?&gt;
  </code></pre>
  
  <p>... but nothing changed. Any thoughts?</p>