Studyon Minte9.com
Magento




Category parent id



// parent id
	$parent_id = Mage::registry('current_category')->parent_id; 


// main parent id
	$category = Mage::registry('current_category');
	if ($category) {
		$categoryId = $category->getId();
		$parents = Mage::registry('current_category')->getParentIds();
		if ( (isset($categoryId) && $categoryId == 10) || (isset($parents[2]) && $parents[2] == 10) ) {
			...
		}
	}


http://www.magentocommerce.com/boards/viewthread/16357