Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to have different elements on the homepage than the rest of the site…
 
mmabardy
Member
 
Total Posts:  67
Joined:  2010-07-09
 

For example, I would like to not display the “logo” on the homepage but I would like it on the rest of the site. 

I would like the main nav bar to be closer to the middle of the page on the home page only.  ON the rest of the site it will be in the same place

I would like a background image on the homepage ony (which I am having trouble calling it from the CMS page) and I dont need the background on the rest of the site. 

If anyone can help with this, I am very appreiciative.  Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tom Robertshaw
Moderator
 
Avatar
Total Posts:  485
Joined:  2009-05-17
Bath, UK
 

Hi,

You can use this snippet in the php templates to find out if the current page is the home page.

<?php if ($this->getIsHomePage()):?>

You can target the home page only in css by looking for the body class “cms-home”.

Hope that helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mmabardy
Member
 
Total Posts:  67
Joined:  2010-07-09
 

Hi.  Yes, that did help.  Thank you very much.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top