cancel
Showing results for 
Search instead for 
Did you mean: 

custom layout settings won't apply

custom layout settings won't apply

I have small problem with Magento. I'm not Magento guru but i'm trying to figure out this error.

And this 1column page won't be 1 column, it always two-column. Where can i check it?

I set in admin to this page custom layout - 1 column and for all others - use parent settings, on root category i set 2 column with left pad - no luck.

Inside theme/package/layout/local.xml the template for catalog pages was set to:

<catalog_category_layered translate="label">
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
For this one page the settings on admin was set to: Page Layout: 1 column.

These settings are not stable. In case the page is reloaded several times in a row, sometimes, I see, that the template for this page is "2-columns-left.phtml", sometimes - it is correct and is "1column.phtml"

Please i'll be glad for any help.

6 REPLIES 6

Re: custom layout settings won't apply

Hello,

 

You can put into your theme's local.xml the following:

<catalog_category_default>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
</reference>
</catalog_category_default>

The important thing beeing the handle <catalog_category_default>.

Also remove all custom layouts you have set in admin.

 

Edit: In your post there is missing <template> </template> tag and also the closing </action> and handle, but I figured that was a typo.

 

Hope it helps,

Cheers

Re: custom layout settings won't apply

Hello!

Sorry for missing tags - it's mistake, yes, just forgot to copy-paste.

If i add this into local.xml - what happens to other pages? I need 1-column layout only in one category. All others should be 2-column.

Thank you very much for your answer.

Re: custom layout settings won't apply

Hello,

 

This will set 1colummn.phtml template to all category pages, but you should be able to change layout for single category in admin. I just tested this on my local magento and it's working.

If the problem persists I'm afraid that without more information on your magento install I can't help you further.

 

Edit: In your case you should put 2columns-left.phtml (or right) as your default template. Also be sure to check the spelling Smiley Happy

 

Cheers

Re: custom layout settings won't apply

Yes, i put same config in my local.xml (expect i set 2columns-left.phtml) and set custom layout "1 column" in Admin for single category. And i've got same problem - sometimes page loads 1 column, but sometimes it has 2columns layout! I'm just reloading it multiple times with browser cache clearing and getting unstable results.

If i can provide you more information - just ask.

Thanks a lot!

Re: custom layout settings won't apply

What magento version are you using? And which template?

You can also try with the

<CATEGORY_{ID}>

handle instead of the <catalog_category_default>, see if that works.

 

Cheers

Re: custom layout settings won't apply

OK. If i set <catalog_category_layered translate="label"> in local.xml and in Admin in categories in Custom Layout i set "No layout updates" - my single category page always 2-column (as i select in local.xml).

 I also tried to add:  

<category_XX>  
<reference name="root">  
<action method="setTemplate"><template>page/1column.phtml</template></action>  
</reference>  
</category_XX>  

 

It seems not working.