- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento. How to add sidebar to the Site Map page
January 29, 2016
This tutorial will show you how to add a sidebar to the Sitemap page in Magento.
Magento. How to add sidebar to the Site Map page
-
Using your file manager navigate to app/design/frontend/tm_themes/themeXXX/layout folder.
-
Open local.xml file using any text editor.
-
Add the following code:
<catalog_seo_sitemap translate="label"> <label>Catalog Seo Sitemap (Common)</label> <remove name="right"/> <remove name="left"/> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> </catalog_seo_sitemap>
-
Depending on what page layout you wish to use for Sitemap page, we can remove Left or Right Column or keep both of them for Three Columns Layout.
-
Let’s see an example of the 2columns-left page:
-
Comment or remove the following code:<remove name="left"/>
-
Change the following code:<template>page/1column.phtml</template> to: <template>page/2columns-left.phtml</template>
As a result, you should have the following:
<catalog_seo_sitemap translate="label"> <label>Catalog Seo Sitemap (Common)</label> <remove name="right"/> <-- <remove name="left"/> --> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> </catalog_seo_sitemap>
-
-
Using the same method you can add the Right sidebar or both (Left and Right):
-
To keep Left and Right sidebars on Sitemap page, you need to remove:
<remove name="right"/> <remove name="left"/>
-
Then change: <template>page/1column.phtml</template> to: <template>page/3columns.phtml</template>
Example:
<catalog_seo_sitemap translate="label"> <label>Catalog Seo Sitemap (Common)</label> <reference name="root"> <action method="setTemplate"><template>page/3columns.phtml</template></action> </reference> </catalog_seo_sitemap>
NOTE: If you do not see any changes on your site after following the above steps, please navigate to app/design/frontend/rwd/default/layout/catalog.xml, look for SEO Site Map and remove the following code:
<remove name="right"/> <remove name="left"/>
Thank you for reading this tutorial. Now you know how to edit Sitemap page layout.
-
Feel free to check the detailed video tutorial below: