tags:

views:

111

answers:

2

I have a newsletter box in my Magento sidebar that I need to change the position of.

It appears beneath the app/design/frontend/default/theme/template/callouts/right_col.php template.

I've been trying to get my head around the XML files for layout. I couldn't find any mention of newsletter in page.xml or catalog.xml. There is a newsletter.xml, but I couldn't get my head around it.

How do I move it?

+1  A: 

You can open up newsletter.xml and find this

<default>

    <!-- Mage_Newsletter -->
    <reference name="right">
        <block type="newsletter/subscribe" name="right.newsletter" template="newsletter/subscribe.phtml"/>
    </reference>

</default>

Then add an attribute to block titled before and set its value to "-", as in...

<default>

    <!-- Mage_Newsletter -->
    <reference name="right">
        <block type="newsletter/subscribe" name="right.newsletter" before="-" template="newsletter/subscribe.phtml"/>
    </reference>

</default>
alex
A: 

in newsletter.xml

<default>    
<reference name="left">
     <block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml" before="-" />
    </reference>
</default>

you have this options:

  • before="-"
  • after="-"
  • before="name-other-module" or after="name-other-module"
Seeal
have more information here: http://www.magentocommerce.com/design_guide/articles/intro-to-layouts
Seeal