I have a question about Mage::registry and categories: I’m a on a category page, I retrieve current category by Mage::registry('current_category'). I’ve noticed that it works only for root categories, in fact if I visit a subcategory page I retrieve always the root category with Mage::registry('current_category'). So the question is: is something about backend configuration, cache or something else?
I have a question about Mage::registry and categories: I’m a on a category page,
Share
OOB,
current_categoryis set inMage_CatalogCategoryController::_initCategory()(ref here) and will always be equal to the category currently being viewed.If your data is different then your app has non-standard functionality or you are seeing cached results.