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 do I remove the navigation from the home page? 
 
zoooj
Member
 
Total Posts:  34
Joined:  2008-10-13
London, United Kingdom
 

This is a bit of a strange one. I’ve searched these forums and googled the problem but haven’t got anywhere so far. The issue is that I don’t want the navigation to appear on the home page. Instead, I’m building a custom home page. So, I’ve started designing a new template and got the new home page into a 1 column layout so I can begin populating the main section with content. The problem is that while all other template paths state the new template I’m using the one that I need to remove doesn’t.

You can see in the screenshot that frontend/default/default/template/catalog/navigation/top.phtml pulls the navigation through. However, all other blocks use the bellezara template frontend/default/bellezara/template/page/template/links.phtml. Why is default being used for this one block?

I have to admit that I’m only beginning to get to grips with the underlying structure but am prepared to learn if you’ll point me in the right direction!

Image Attachments
default_nav_displayed.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
zoooj
Member
 
Total Posts:  34
Joined:  2008-10-13
London, United Kingdom
 

Ok. I found mage/catalog/block/navigation.php as described by the template paths and am pretty certain I shouldn’t touch this. I imagine I have to somehow create a new page_home.xml file for this one particular page ... that’s where I’m kind of grinding to a halt.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xjavs
Jr. Member
 
Total Posts:  7
Joined:  2008-04-23
Oceanside, CA
 

One way to hide the menu on a particular page is to use CSS.  By default on the home page the body element has a class of “cms-home”.  The menu has a class of “header-nav”.  So to hide the menu on the front page add the following to your boxes.css file:

body.cms-home div.header-nav {display:none;}

The above will hide the menu only when you are on the home page.

 
Magento Community Magento Community
Magento Community
Magento Community
 
zoooj
Member
 
Total Posts:  34
Joined:  2008-10-13
London, United Kingdom
 

That’s a neat solution as I won’t be stymied by an upgrade. Simple but effective. Thanks - should have thought of it myself to be honest but I was focusing on the coding side. Thanks.

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