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

Edited main.xml but layout doesn’t change
 
typemismatch
Member
 
Avatar
Total Posts:  34
Joined:  2007-09-19
 

I’ve duplicated the default files into my new skin/theme etc.

I’ve reconfigured ->Design with the new folder name.

Every change is appearing fine except the default layout which I edited in main.xml (no default.xml?? as per wiki)

I’ve tried a few layouts, nothing ever changes. I’m aiming for a 2 column setup.

Thanks,
Craig

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Many layout updates overwrite the default template used for root block (3columns.phtml).

Look in main.xml for all instances of “<template>page/” and replace as needed

 
Magento Community Magento Community
Magento Community
Magento Community
 
typemismatch
Member
 
Avatar
Total Posts:  34
Joined:  2007-09-19
 

Done - still no joy, what is the id/block of the home page the user first hits?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Oh, the homepage - in Admin / CMS / Manage Pages / Home page - find dropdown for Layout - that’s it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
typemismatch
Member
 
Avatar
Total Posts:  34
Joined:  2007-09-19
 

Yup thanks I had just found it - ok so that is a bit inconsistent? layouts are all defined on disk in xml files except CMS pages which happen to be the first page you need to edit? Don’t get me wrong I prefer it in the manager - maybe we can move more into that system.

-c

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

It’s consistent according to this scheme:

There are:
1. Design Package layouts updates.
These suppose to be the base designs that are distributed through magento repository or directly between users.
Advanced users can also create their own themes and save them in files.

2. Admin User layout updates.
Here we have layout updates for Static Pages, Categories, Products, etc. that is manageable from admin interface.
These are stored in database and are specific to your local installation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kris
Jr. Member
 
Total Posts:  11
Joined:  2007-09-30
NZ
 

hi there,

a question along the same lines....

Is it possible to have a block appear only on the homepage and not on any other pages?
I’ve had success in adding additional blocks via main.xml to root which I then called in 2columns-right.phtml with

<?=$this->getChildHtml('myBlockName')?>

Unfortunately it will now show wherever 2columns-right.phtml is used. Is there any way to restrict the call to the homepage only? Trying to add the above into the CMS content section in the admin backend will only display the code as text.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
kris
Jr. Member
 
Total Posts:  11
Joined:  2007-09-30
NZ
 

thanks ohminu, that worked on most of the pages. Unfortunately the block still appears on the CMS pages that have a 2colums-right layout…

Any chance that there will be a special layout update handle just for the homepage or the CMS pages in general?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kris
Jr. Member
 
Total Posts:  11
Joined:  2007-09-30
NZ
 

Hmmm I feel like I am missing something. That section doesn’t seem to appear - See attached screenshot.

Was this the page you were referring to?

Image Attachments
admin-cms-home.gif
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top