I need to exclude a single category from a collection of categories. The code I use to get the collection:
$layer = Mage::getSingleton('catalog/layer');
$_category = $layer->getCurrentCategory();
$_parent_category = $_category->parent_category;
$_grandparent_cat = $_parent_category->getParentCategory();
$eid = $_parent_category->entity_id;
and now the code I use to filter the categories
$_new_categories = $_grandparent_cat
->getChildrenCategories()
->addAttributeToSelect("*")
->addAttributeToFilter('entity_id', array('neq'=>$eid));
This should take all child categories of the grandpared_cat and return them, excluding the current cat(the one with $eid) but it returns all subcategories. How can I solve this? Thanks :)!