I have a challenge doing the following statement. In breadcrumbs.phtml I would like to do the following:
h1
if cms page then getTitle
else if category page then getName
else if product page then getName
/h1
Now I figured out these two statements:
<?php echo Mage::registry('current_product')->getName()?>
<?php echo Mage::registry('current_category')->getName()?>
but I can’t figure out how to get them into the if statement or how to make the if statement entirely.
Any help is much appreciated.
getProductPagedeprecatedgetCategoryPagedeprecatedinstead of above code, please try this and let me know result :