0

I want to make sure that the compare products block is positioned at the top of the page under Filters. I don't want to put it in the left sidebar though. Is there a way to adjust the layout on lower res screens so that it will have this layout?

0

In the Changes to Layout Files section of the Magento RWD theme document, it states this:

Because two and three column layouts collapse to a single column on smaller viewports, all content in the left block are displayed under the main content. This is a problem because blocks—like the navigation on all My Account pages—must display above the main content on smaller viewports. To address this, a new left_first block was added that looks like the left column on larger viewports, but on smaller viewports, it displays above the main content.

So what you need to do is to move the catalog.compare.sidebar block to the left_first block. The code will look something like this:

<default>
    <reference name="left_first">
        <action method="append">catalog.compare.sidebar</action>
    </reference>
    <reference name="right">
        <action method="unsetChild">catalog.compare.sidebar</action>
    </reference>
</default>

The code above will need to be placed on your custom layout file, such as local.xml. I haven't tested the above code, so you may need to tweak it to get it to work.

  • Thanks for the info! I'll dig into this and confirm once I get it working along with any adjustments. – coreyg Feb 6 '15 at 20:11
  • I was able to get it to display at the top when at lower resolution, but I had to put it in the left column. Any tips on keeping it in the right column but keeping it above the main content when it collapses? It may not be easily done which then I'll fall back to putting it into the left column. – coreyg Feb 8 '15 at 6:30
0

I decided to move it to the left sidebar under the layered navigation. Here was the final code to do it:

      <reference name="left_first">
         <block type="catalog/product_compare_sidebar" after="catalog.leftnav" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <action method="append">catalog.compare.sidebar</action>
    </reference>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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