Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It all depends on which view you're in. ;-)</p> <p>First off, I hope you stayed within your template set (default in my example).</p> <p>Use this as an <strong>example</strong>:</p> <pre><code>&lt;?php $_cat = $this-&gt;getCurrentCategory(); $_parent = $_cat-&gt;getParentCategory(); $_categories = $_parent-&gt;getChildren(); /* @var $category Mage_Catalog_Model_Category */ $collection = Mage::getModel('catalog/category')-&gt;getCollection(); /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */ $collection-&gt;addAttributeToSelect('url_key') -&gt;addAttributeToSelect('name') -&gt;addAttributeToSelect('is_anchor') -&gt;addAttributeToFilter('is_active', 1) -&gt;addIdFilter($_categories) -&gt;setOrder('position', 'ASC') -&gt;joinUrlRewrite() -&gt;load(); $productCollection = Mage::getResourceModel('catalog/product_collection'); $layer = Mage::getSingleton('catalog/layer'); $layer-&gt;prepareProductCollection($productCollection); $productCollection-&gt;addCountToCategories($collection); // $productCollection should be ready here ;-) ?&gt; </code></pre> <p>I'm using the above code to display sister categories in my template - it's not ideal but it works.</p> <p>It's sort of a hack because I did not yet have time to learn all the layout XML madness. Otherwise if you use the XMLs you need to keep in mind - it all depends on where you are at. <strong>Where</strong> means the template file and essentially also the layout (in terms of app/design/frontend/default/default/layout/*).</p> <p>I know it's not much, but I hope it helps to get you started.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload