for design purposes -css customization - I need to echo in my catalog list view the first category. Taking into consideration that the first category is Root (or default) all paths give me that category id number. consequently I need to retrieve the code of the second category starting on root.
example: default category (id=1) - electronics (id =2 )- mp3 players(id=3) - ipod (id=4). when I´m visiting category ipod I would like to echo in my view 2 (for id=2).
I tested this code
$_cat = new Mage_Catalog_Block_Navigation(); getCurrentCategory(); $curent_cat_id = $curent_cat->getId(); load($curent_cat_id)->getParentId(); echo $parentId;
but I´m receiving the first root category. Does anyone knows if I can pass any parameter to retrieve the root category + 1?. brgds!