Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Re-ordering Items in the left and right columns
 
FetchDesigns
Sr. Member
 
Avatar
Total Posts:  124
Joined:  2008-04-11
Chicago, IL
 

Is there any good way to sort items in the side columns with more accuracy than just before="-" and after="-"?

For example, my left column currently looks like this…

1. Compare Products
2. Custom Block A (in catalog.xml)
3. Custom Block B (in catalog.xml)
4. Custom Block C (in catalog.xml)
5. My Cart
6. Newsletter

and I would like it to be sorted like this…

1. Custom Block A (in catalog.xml)
2. Newsletter
3. My Cart
4. Compare Products
5. Custom Block B (in catalog.xml)
6. Custom Block C (in catalog.xml)

I haven’t, for the life of me, even been able to move my Compare Products block.  I did figure out how to remove the before="-" from the My Cart block which is how I got it below all my catalog.xml items.  Any thoughts on how to do this properly?

 
Magento Community Magento Community
Magento Community
Magento Community
 
laurent
Member
 
Total Posts:  75
Joined:  2007-08-31
Paris, France
 

first block: before="-"
last block: after="-"
before an other block: before="block_name"
after an other block: after="block_name"

 
Magento Community Magento Community
Magento Community
Magento Community
 
FetchDesigns
Sr. Member
 
Avatar
Total Posts:  124
Joined:  2008-04-11
Chicago, IL
 

Thank you so much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Princeanil
Jr. Member
 
Total Posts:  28
Joined:  2008-05-06
 

Hi !

I’m new to magento. Can you pls explain how you move the blocks on the left and right column ?
I’ve read the designers guide and i am throughly confused.  I’ve read it 3 times now, and im thrice confused.

What has layout got to do with moving blocks ?  Why are the left blocks being called from catalog.xml ?
What if i want the shopping cart block to be on the left instead of right ?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
plainspace
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-01-23
 

I’m getting this to work but I can’t get the right.permanent.callout to behave.  The before"-" doesn’t seem to apply to it the way it does to others.

<!--
Default 
layoutloads most of the pages
-->

    <default>

        <!-- 
Mage_Catalog -->
        <
reference name="top.menu">
            <
block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
        </
reference>
        <
reference name="left">
            <
block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
                <
action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
                <
action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800DEMO-NUMBER.</alt></action>
                <
action method="setLinkUrl"><url>checkout/cart</url></action>
            </
block>
        </
reference>
        <
reference name="right">
            <!-- <
block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/> -->
            <
block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/>
        </
reference>
        <
reference name="footer_links">
            <
action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
        </
reference>

    </default>

You’ll see that I commented out the catalog.compare.sidebar block.  Does anyone know what I am missing?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
laurent
Member
 
Total Posts:  75
Joined:  2007-08-31
Paris, France
 
plainspace - 21 May 2008 07:11 PM

I’m getting this to work but I can’t get the right.permanent.callout to behave.  The before"-" doesn’t seem to apply to it the way it does to others.

How is it applied?
An other block may have before="-". Maybe the cart block?

 
Magento Community Magento Community
Magento Community
Magento Community
 
plainspace
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-01-23
 

Got it!  Thanks for you help laurent!

 
Magento Community Magento Community
Magento Community
Magento Community
 
rene1611
Member
 
Total Posts:  40
Joined:  2009-02-14
 

hey,

i added a custom static block to /catalog.xml. now i would like to change the order of the blocks. the first block is the cart, the second
“Recently Viewed Products” - blocks and the third is the “Compare Products” block. it would be great to get my custom made block as number one. anyone an idea?

any help appreciated.

thanks,
rené

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