- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2015
01:28 AM
08-26-2015
01:28 AM
How to remove left category from homepage?
How to remove left category from home page using xml or other method?
<?xml version="1.0" ?> <layout version = "0.1.0"> <default> <cms_index_index> <reference name="left"> <block name="home-page-block"> <remove name="catalog.leftnav"> </block> </reference> </cms_index_index> </default> </layout>
I tried this code in local.xml but not working
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2015
06:55 AM
08-26-2015
06:55 AM
Re: How to remove left category from homepage?
1, your layout xml is wrong, cms_index_index shouldn't be in default, it should be under layout directly, and also you want to call remove action under refenrece directly
2, cms index is special, it doesn't call $this->loadLayout(); as many other controllers, instead, it loads only a few handlers (like 'default, 'cms_page'') itself, unless you want to remove left catagory from all cms, then you can use 'cms_page' handler, your best bet is to use custom layout in admin cms page manager, simply write in custom layout
<reference name="left"> <remove name="catalog.leftnav"> </reference>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2015
07:00 AM
08-28-2015
07:00 AM
Re: How to remove left category from homepage?
Hi @Prashant_Tapase,
Here are 2 ways you can achieve it:
- Remove Left Bar using xml
- Change the Homepage Layout to 1 column
Was my answer helpful? You can accept it as a solution.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer