I would like to list only the first level child categories of the current category.
This is what is have right now:
$_category = Mage::registry('current_category')->getId();
$_categories = $_category
->getCollection()
->addAttributeToSelect(array('name', 'image', 'description'))
->addIdFilter($_category->getChildren());
foreach ($_categories as $_category):
echo $_category->getName();
endforeach;
The shop is using flat categories, and i have no idea how to show only the first level of child categories.
Been searching a lot but every script i use still show all the sub-sub categories instead only the sub categories.
EDIT:
Just to be clear
When the current page is:
Category (current page)
-- sub A <-- show this sub category
--- sub A sub
---- sub A sub sub
-- sub B <-- show this sub category
--- sub B sub
---- sub B sub sub
Category
-- sub A (current page)
--- sub A sub <-- show this sub category
---- sub A sub sub
-- sub B
--- sub B sub
---- sub B sub sub