I'm novice in Magento. I want to add newsletter option in footer and set newsletter functionality in footer.
I suppose you speak about the newsletter block to place it in the template. A solution is to create a local.xml layout file in your theme.
For example, your theme is located at /app/design/frontend/default/mytemplate/layout/local.xml
The local.xml has for advantage to allow you to overwrite core layout structure for your own template without the need to copy the whole newsletter.xml layout file of the base template.
Maybe you will need to remove the previous place of the newsletter block. I give you a sample of it below.
In this local.xml file you can do the following:
<?xml version="1.0"?>
<layout version="0.1.0">
<!--
Default layout, loads most of the pages
-->
<default>
<remove name="left.newsletter" /> <!-- if you want to remove the newsletter block which is on the left side -->
<!-- Mage_Newsletter -->
<reference name="footer">
<block type="newsletter/subscribe" name="newsletter" as="newsletter" template="newsletter/subscribe.phtml" before="-" />
</reference>
</default>
</layout>
Then, in your footer.phtml, you should add the following:
<?php echo $this->getChildHtml('newsletter'); ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With