0

In my local.xml I have two columns left declared in my theme yet 3-Columns is the layout thats displayed. Template path hints points to the 3 column template in my selected theme. Where else can I check other than Local? I'm assuming admin if local is the last to parse.

<layout version="0.1.0">
<default translate="label" module="page">   
    <reference name="head">

        <!-- Adding Javascript -->
        <action method="addItem">
            <type>skin_js</type>
            <name>js/jquery.min.js</name>
        </action>

        <action method="addItem">
            <type>skin_js</type>
            <name>js/bootstrap.min.js</name>
        </action>

        <action method="addItem">
            <type>skin_js</type>
            <name>js/jquery.scripts.js</name>
        </action>

        <action method="addItem">
            <type>skin_js</type>
                <name>js/html5shiv.js</name>
            <params/><if>lt IE 9</if>
        </action>

        <action method="addItem">
            <type>skin_js</type>
                <name>js/respond.min.js</name>
            <params/><if>lt IE 9</if>
        </action>


        <!-- Removing the style.css from Base-->
        <action method="removeItem">
            <type>skin_css</type><name>css/styles.css</name>
        </action>
        <action method="removeItem">
            <type>skin_css</type><name>css/print.css</name>
        </action>
        <!-- Adding Bootstrap Css -->
        <action method="addCss">
            <stylesheet>css/bootstrap.min.css</stylesheet>
        </action>



        <!-- Adding our custom style.css -->
        <action method="addCss">
            <stylesheet>css/styles.css</stylesheet>
        </action>

        <block type="core/text" name="fontawesome_cdn">
            <action method="setText">
                <text><![CDATA[
                    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" />
                ]]></text>
            </action>
        </block>

    </reference>
    <!-- end HEAD -->


<reference name="header">
    <block type="cms/block" name="headerSocial" as="headerSocial">
        <action method="setBlockId"><block_id>headerSocial</block_id>
        </action>
    </block>
    <block type="cms/block" name="topNav" as="topNav">
            <action method="setBlockId"><block_id>topNav</block_id></action>
    </block>
    <block type="cms/block" name="primaryNav" as="primaryNav">
            <action method="setBlockId"><block_id>primaryNav</block_id></action>
    </block>
</reference>

<block type="cms/block" name="homeFeatured" as="homeFeatured">
            <action method="setBlockId"><block_id>homeFeatured</block_id></action>
    </block>

<block type="cms/block" name="homeBanner" as="homeBanner">
            <action method="setBlockId"><block_id>homeBanner</block_id></action>
</block>

<reference name="footer">
        <block type="cms/block" name="footerCustomerService" as="footerCustomerService">
            <action method="setBlockId"><block_id>footerCustomerService</block_id>
            </action>
        </block>
        <block type="cms/block" name="footerProducts" as="footerProducts">
            <action method="setBlockId"><block_id>footerProducts</block_id>
            </action>
        </block> 
        <block type="cms/block" name="legalFooter" as="legalFooter">
            <action method="setBlockId"><block_id>legalFooter</block_id>
            </action>
        </block>  
        <block type="cms/block" name="socialLinks" as="socialLinks">
            <action method="setBlockId"><block_id>socialLinks</block_id>
            </action>
        </block> 
</reference>

<block type="cms/block" name="welcomeMessage" as="welcomeMessage">
    <action method="setBlockId"><block_id>welcomeMessage</block_id>
    </action>
</block>

<reference name="top.links">
    <remove name="top.links" />
</reference>

<remove name="left.permanent.callout" /> 



</default>

<catalog_product_view>
        <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference> 
        <remove name="product_tag_list" />
</catalog_product_view>

<catalog_category_layered>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
</catalog_category_layered>




</layout>
7
  • What type of page is this? A Category View Page, Product View Page, CMS Page? Each of these have admin fields for "Layout", which will take precedence over what you set in local.xml (if something is selected) Jan 16, 2015 at 18:54
  • I apologize. Category Page. Jan 16, 2015 at 18:54
  • Check the category, go to "Custom Design" tab, and make sure "Page Layout" is "No Layout Updates". Also, Categories have TWO different layout handles depending on if "Is Anchor" on the "Display Settings" tab is set to yes or no. "Yes", the layout handle is "catalog_category_layered", "No" the layout handle is "catalog_category_default". Jan 16, 2015 at 18:56
  • Thats not changing it. Its defaulting to 3 columns of the package Im using. Is that set in the base page.xml? Jan 16, 2015 at 19:04
  • Please update your question, to include the code you have in local.xml that you're using to attempt to change the layout. Jan 16, 2015 at 19:05

1 Answer 1

1

If you're category is set to "Is Anchor" => "No", local.xml should have something similar to the following:

<?xml version="1.0"?>
<layout>
    <catalog_category_default>
        <reference name="root">
            <action method="setTemplate"><file>page/2columns-left.phtml</file></action>
        </reference>
    <catalog_category_default>
</layout>

For Anchor categories, the layout handle is different, this will be the only difference:

<?xml version="1.0"?>
<layout>
    <catalog_category_layered>
        <reference name="root">
            <action method="setTemplate"><file>page/2columns-left.phtml</file></action>
        </reference>
    <catalog_category_layered>
</layout>
4
  • Inserting those killed all layouts. Jan 16, 2015 at 19:29
  • The entire file should not be added to your existing local.xml, just the layout handle and it's contents (i.e. "catalog_category_default"). The examples above would be if you had no local.xml file prior to this. Jan 16, 2015 at 19:35
  • I only added between the handles. Jan 16, 2015 at 19:39
  • I'm not really sure where in your source code it is going wrong. Do you have logging turned on and is anything showing up in var/log/system.log or var/log/exception.log? The source code you have in your question is correct already. It may just be that you need to change "catalog_category_layered" to "catalog_category_default" depending on the settings of "Is Anchor" on the category. Jan 16, 2015 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.