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?
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"
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>
精彩评论