1

I have a template in

 app\design\frontend\base\default\template\dir\template.phtml

that look like this

<div class='block block-list'>  
    <div class='block-title'><strong><span>Some Block</span></strong></div>
        <div class='block-content'>  
            &nbsp;<?php echo "my content"; ?>
        </div>
    </div>

I positioned the block on the catalog page by adding the following code to the local.xml file. However is it possible to position the block to the top of the column at the same time?

 <?xml version="1.0"?>
 <layout version="0.1.0">    
      <catalog_category_default translate="label"> 
       <reference name="right">
         <block  type="core/template" 
            name="somename"
            template="dir/template.phtml" />
      </reference>
     </catalog_category_default>    
 </layout>

follow up on https://stackoverflow.com/posts/15736207/edit

1
  • add before="-" to the <block> node. Commented Apr 3, 2013 at 1:38

1 Answer 1

1

Code for Positioning a CMS Block (layout xml file)

<block type="cms/block" before="-" name="left.permanent.callout">
<block type="cms/block" before="some-other-block" name="left.permanent.callout">
<block type="cms/block" after="-" name="left.permanent.callout">
<block type="cms/block" after="some-other-block" name="left.permanent.callout">

Using before and after attribute it is possible to change the block order...

some-other-block is the block's name attribute

http://www.magentocommerce.com/knowledge-base/entry/controlling-block-order

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.