How to change page layout in Magento?

I want to change the layout of the 2columns-left.phtml category page. The default layout is 3 columns. I only want to set the page layout of the 2columns-left.phtml . The rest should contain the default page layout (3 columns). How can i do this?

+4
source share
3 answers

You can do this for individual categories on the Design tab. You can do this for all categories by adding local.xml to your special layout folder, which contains the following:

 <?xml version="1.0"?> <layout> <my_category_root_template> <reference name="root"> <tpl>page/2columns-left.phtml</tpl> </reference> <my_category_root_template> <catalog_category_layered> <update handle="my_category_root_template" /> </catalog_category_layered> <catalog_category_layered_nochildren> <update handle="my_category_root_template" /> </catalog_category_layered_nochildren> <catalog_category_default> <update handle="my_category_root_template" /> </catalog_category_default> <!-- EDIT: forgot about search results page --> <catalogsearch_advanced_result> <update handle="my_category_root_template" /> </catalogsearch_advanced_result> <layout> 

For more information, Magebase has an excellent XML Layout template , and Alan Storm has written a book about it .

+8
source

I don’t have much experience with magneto, but I think it might work.

Go to admin-> Catalog-> Categories-> Manage Categories

Then go to β†’ Custom Design

You will find the Page Layout option, which changes as you like.

+1
source

First, configure the categories: in the admin panel, select the "Catalog" menu. Then, on the left, select the category you want to edit. On the right, the Custom Design tab contains the Page Layout property. If you want all categories to have the same layout, set the page layout of the root category accordingly, and then the child categories - the "Use parent categories" - "True" property.

The layout for all other pages will be determined by the CMS-> Pages page. Click on the page to change, then on the left side select "Design" and then on the right, the "Layout" property.

If you are interested in how to make sure that all subsequently created pages in the CMS administration area use a specific layout by default, so you don’t need to change it every time you create a new content page, I’m not some, as it seems to me, by default for 1column, although XML seems to set up the page to use a 3-column (I mean, that is in /app/design/frontend///layout/page.xml). I can misunderstand how this is related to this, although perhaps someone can comment. I understand that CMS pages have their layout options and user location information stored in the database. Therefore, perhaps there is another parameter in the database that selects the default value when creating a new CMS page.

+1
source

Source: https://habr.com/ru/post/1402151/


All Articles