1

My sidebar from the category pages shows up on the bottom of my category. I wasn't like this yesterday, but it doesn't come to the side. Where can i adjust this or where could it be changed cause it cant be showed to my customers like this.

http://www.thefixedgearshop.com/nl/accessoires/zadels that is the category shown below.

Category

<catalog_category_default translate="label">
    <reference name="left">
            <action method="unsetChild"><alias>catalog.leftnav</alias></action>
            <action method="insert"><blockName>catalog.leftnav</blockName><before>athlete_sideblock_banners</before></action>
    </reference>
    <reference name="product_list">
        <block type="cms/block" name="athlete_empty_category" as="athlete_empty_category">
            <action method="setBlockId">
                <block_id>athlete_empty_category</block_id>
            </action>
        </block>
    </reference>
</catalog_category_default>

This is the code that is related towards it: Catalog_category_default

Also i found this one:

<reference name="root">
        <action method="setTemplate">
            <template>page/2columns-left.phtml</template>
            <action method="setIsHandle">
                <applied>1</applied>
            </action>
        </action>
        <action ifconfig="athlete/layout/fluid" method="addBodyClass"><classname>grid-fluid</classname></action>
    </reference>

I edited the options_base_nl.css file and edited the following code:

.col2-layout .sidebar { width: 20.41%;} .col2-layout .col-main { width: 74%;} .col2-left-layout .col-main-wrap { margin-left: 30px;} .col2-right-layout .col-main-wrap { margin-right: 300px;} .col2-layout .col-main { width: 100%;} .col2-layout .sidebar { width: 245px;}

But when i set col2-layout .col-main { width:74% } towards 100% it drops my sidebar on the category page to the bottom again. When i set it towards 74% it makes the sidebar come up, but the product page gets the 26% of the missing width as a sidebar width in the page (see photo below)(the left white part should be like the photo afterwards). It creates a weird looking messy product page. I haven't had this problem before, what can it be?

Photo with 74% of the width that will show sidebar on cat page

Photo with 100% width that will not show sidebar on cat page but good product page.

4
  • Are you sure the layout itself has changed, or could it be a simple CSS issue? It seems to me something is causing your content block to be too large, pushing your sidebar down. May 24, 2015 at 20:13
  • 2
    Look at your options_base_nl.css file. Line 481 .col2-layout .col-main set that to 70% and you'll see your sidebar come up. I'd suggest starting there. May 24, 2015 at 20:18
  • @TimHallman when i put the 70% width in at that point, it also takes the 70% width towards my product page. This makes the product page have a 30% sidebar that i don't even have. When i put it on 100% in the .col2-layout col-main part then my product page has the good layout, but my sidebar disappears. How can i resolve this? May 25, 2015 at 9:46
  • Check for more specific classes perhaps... for instance your page might have a class for the page May 25, 2015 at 12:16

2 Answers 2

0

To change the category page layout:

From the Admin menu, select Catalog > Manage Categories.

In the Categories tree, select the category level you want to change.

On the Custom Design tab, set Page Layout to “2 columns with left bar.”

Click the Save Category button

3
  • This is set to 2 column with left bar... But it does not show it on the column left bar. May 24, 2015 at 10:42
  • please change it through local.xml. It seems that your theme is using 3column layout. May 24, 2015 at 10:44
  • Where in the code can i find this. My XML file says: <template>page/2columns-left.phtml</template> May 24, 2015 at 10:47
-1

you need to create a local.xml filed under your themes layout folder.

File : app\design\frontend\\\layout\local.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <catalog_category_default>  <!-- for default categories -->
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>
    </catalog_category_default>
    <catalog_category_layered> <!-- for layered categories  -->
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>
    </catalog_category_layered>
</layout>
7
  • There is a layout/local.xml file in that folder, filled with the set-up. I haven't changed anything in that file and this morning it didn't work anymore. May 24, 2015 at 10:51
  • find the tag <catalog_category_default> and change the <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> and then clear your magento cache. May 24, 2015 at 10:55
  • This does not work. My XML file is not doing anything it looks. I put the above code in the XML, but it is not doing anything. It looks like the sidebar just gets pushed towards the bottom. May 24, 2015 at 11:07
  • see added code up the edit of my post. May 24, 2015 at 11:11
  • <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> May 24, 2015 at 11:15

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.