Browsed by
Author: Nitin C

Magento How To Check Is Home Page In phtml File

Magento How To Check Is Home Page In phtml File

Magento how to check is home page in phtml file.

Today we will discuss how to check is home page  in phtml file.

First Need to open  template file .

<?php if(Mage::getSingleton(‘cms/page’)->getIdentifier() == ‘home’ &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == ‘cms’) : ?>

// your home page content is here.

<?php endif; ?>

thanks

Magento How to get dropdown attribute value in product page

Magento How to get dropdown attribute value in product page

Magento How to get dropdown attribute value in product page.

Today we will discuss how to add drop-down attribute on product Page.

First Need to open file in below directory or folder path.

app/design/frontend/your_theme_name/default/template/catalog/product/view.phtml

<?php echo $_product->getAttributeText(‘attribute_code_here’);?>

Thanks