views:

163

answers:

2

I'm confused. if the default handle in page.xml defines the default page layout. How come when you first install magento. Its set as 3 column layout but the front page is a 2 column

+3  A: 

Hmmm... not so sure... If you install Magento from scratch with the default template, the home page is a 3 column layout : http://demo.magentocommerce.com/

Anyway, if you see a template that has a 2 column layout whereas the default layout of catalog.xml is a 3 column it certainly means that there is a custom layout in the CMS page of the home page.

In the backend, see CMS > Pages > Home. Then on the "Design" tab, you may find that the "Layout" dropdown is set to "2 column with [...] bar". Setting it to "3 columns" would do the trick.

To put it theorytically (is that good English ?!) : xml layout files are used for generic layout for each area/module of the site (catalog, customer, checkout, search...) but can be overwritten on a per-page basis thanks to the Custom Layout feature that you will find in CMS Pages, Categories and Products edition pages.

vrnet
theoretically ;)
greg0ire
Ok, that makes sense. So What if I wanted to make a generic layout, or a module my front page. How would I go about doing that ??? Would I delete the CMS home page. Then go to the module like the catalog and give it a handle like <default_index>
numerical25
Background information on Blocks, Layouts, etc. http://alanstorm.com/layouts_blocks_and_templates
Alan Storm
Home page is nothing else than a catalog page which layout then depends on the catalog.xml file. If you want to assign another CMS page as your homepage just create the CMS page you like and then go to System > Configuration > Web > Default pages and chose another home page in the "CMS Hoepage" field. Building your own home page using other modules is more advanced and relies on the good use of the custom layout of your new home CMS page.ie : <reference name="content"><block type="MODULE/BLOCK" name="NAME" template="SOMETEMPLATE"/></reference>
vrnet
A: 

Layout is the tool with which you can assign content blocks to each structural block you create. Layout exist in the form of XML text-file and by modifying the layout you are able to move blocks around in a page and assign templates to the content blocks to produce markup for the structural blocks. In fact, with the help of a few layout files alone, you are able to modify the visual layout of every page in your store. Read further about layouts in Intro to Layouts.A default layout (page.xml) is the layout that by default applies itself to almost every page in the store. All other layout files are Layout Updates that simply updates the default layout on a per-page basis. Have a look at designers guide to magento book. It will help you to understand the working of layouts more clearly.

prateek
thank you for telling me everything I do know. What I am confused is why the front page is a 2 layout and not a 3 layout. but I think vrnet cleared it up for me. The CMS layout overrides the default page.xml layout.
numerical25