in order to retrieve categories path im using the following piece of code in phtml files:
<?php $currentCat = Mage::registry('current_category'); ?>
<?php $exp = explode("/", $currentCat->getPath());?>
I dont understand why,
class Mage_Catalog_Block_Product_List
and its associate catalog/product/list.phtml display the information eg: 1/3/54,
on the other hand,
class Mage_Catalog_Block_Product_List
and its associate catalog/product/view.phtml is not displaying any information. I receive
Fatal error: Call to a member function getPath() on a non-object in \template\page\product.phtml on line 2
I dont know what Im missing, I supposed mage::registry('current_category') was a global variable. and it seems that is not set.