jcadima
8/22/2016 - 8:13 PM

Magento Show Certain Block only on specific category ID or Controller name

Magento Show Certain Block only on specific category ID or Controller name

<?php

 $catName = Mage::getModel('catalog/layer')->getCurrentCategory()->getName();
 $catId = Mage::getModel('catalog/layer')->getCurrentCategory()->getId(); 
 echo $catName . '<br>' ;  // displays: 'Events and Education'
 echo $catId ;  // displays '7'
 
 
 
 // displays:  'category'
 echo $this->getRequest()->getControllerName();