Magento Forum

   
Default template uses 2column-right.phtml and refuses to switch
 
raphael
Jr. Member
 
Total Posts:  10
Joined:  2008-05-06
Los Angeles
 

Hi everyone,

(I’ve scanned the forum and the wiki/knowledge base and haven’t been able to find this question answered elsewhere; my apologies if I overlooked it.)

For some reason, both the default template and my new template based on a copy of the default are using “2columns-right.phtml” as the root template despite page.xml defining “3columns.phtml” (the default selection) as the root, thus:

<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

Despite this, my store insists on using 2columns-right.phtml instead, as Template Path Hints confirms, displaying this:

frontend/default/default/template/page/2columns-right.phtml

This is a brand-new installation of version 1.9870 with no modifications and no products yet added (I haven’t included the sample products).

I’ve tried changing the root block template to other phtml layouts and Magento refuses to change from the “2columns-right.phtml” template it’s chosen. There is no reference in page.xml to the 2columns-right file. I wondered if there was a layout update action command somewhere else that was overriding the default template, but I haven’t been able to find it.

I’m new to Magento, and only just getting the hang of its approach to themes, so there may be a very obvious answer to this issue. But if so, I haven’t yet found it. Any help would be very much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

@raphael
hmmm checkout catalog.xml instead of page.xml, this could be where your layout is changing. Attach a copy if you will also. I’ll take a look.

 
Magento Community Magento Community
Magento Community
Magento Community
 
raphael
Jr. Member
 
Total Posts:  10
Joined:  2008-05-06
Los Angeles
 

@nickL

Hi, thanks for replying.

I changed every instance of the setTemplate action in both catalog.xml and catalogsearch.xml to “3columns.phtml” just to see if one of them was causing the homepage to switch, but it still persists in using “2columns-right.phtml”.

I’ve attached page.xml, catalog.xml, and catalogsearch.xml here just so you can see. “page.xml” should simply be the out-of-the-box default file. The other two have only been modified to say “3columns.phtml” whenever a different phtml template was listed.

As an aside, I have caching turned off via the admin.

File Attachments
catalog.xml  (File Size: 14KB - Downloads: 127)
page.xml  (File Size: 6KB - Downloads: 73)
catalogsearch.xml  (File Size: 4KB - Downloads: 79)
 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

@raphael, Can you provide a link possibly?

Also, check your admin > CMS > Manage pages, in my old installation the homepage was set there to 2 columns. Let me know what you find.

I’ll look over these xml files now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
raphael
Jr. Member
 
Total Posts:  10
Joined:  2008-05-06
Los Angeles
 

Well I’ll be!

I had no idea there was a section in CMS > Manage Pages that would override the layout files. This indeed did the trick, thanks!

I’m assuming all the info contained in these pages resides in the database and overrides any info in the layout files? Must I always use this feature for the home page or can I remove it so that it entirely relies on my layout files (as a designer, I’m more comfortable working there, I suppose)?

Thanks again!

NickL - 13 May 2008 09:56 AM

@raphael, Can you provide a link possibly?

Also, check your admin > CMS > Manage pages, in my old installation the homepage was set there to 2 columns. Let me know what you find.

I’ll look over these xml files now.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top