How to move block newsletter

08 Oct 2010
Do you want to move block newsletter to other positions to refresh your site or make it easier to see but not to find a simple way to do this?

By viewing the following guideline, you can change the position of block newsletter from 'left' to 'right', 'footer' to 'header' or 'right' to 'left' more easily.

The changes are all carried out within the layout.xml located in app\design\frontend\default\your theme\layout\newsletter.xml

1. Move block newsletter from 'left' to 'right' or 'right' to 'left'

 You just change the reference name from ‘left’ to ‘right’,  or ‘right’ to 'left'

<default>

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

 

2. Move block newsletter to 'footer' or 'header'

Fistly, you change the reference name to 'footer' or to 'header'

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

Then, go to: /app/design/frontend/default/your theme/template/page/html/header.phtml
       
And call:

<?php echo $this->getChildHtml('header.newsletter') ?>    to move block newsletter to header

<?php echo $this->getChildHtml('footer.newsletter') ?>    to move block newsletter to footer


If you have any further problem please email us at: [email protected]

Related Posts

Enable Translate Inline

Enable Translate Inline

09 Aug 2010
Sometimes you may want to change default text in Magento, for example from "My cart" to "My basket", or even change the text into your native language.
Enable Template Path Hints

Enable Template Path Hints

06 Aug 2010
One of the most frustrating challenges in developing Magento is to figure out where the blocks are defined and where they are referenced.
Create Magento Featured Products

Create Magento Featured Products

04 Aug 2010
For an online store, it is essential to have the ability to display and sort your products, and thus support your customers in searching and choosing products. This article shows you how to create these featured products on homepage in Magento.
Adding a Static Block to your .phtml files in Magento

Adding a Static Block to your .phtml files in Magento

28 Jul 2010
Adding a Static Block to your .phtml files in Magento