6

Originally, I had the newsletter block in the footer, this is code:

<div>{{block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"}}</div>

I then pasted the above code into the left column instead. After this, I deleted it from the footer but, it is still persisting in footer for some reason.

How do I remove the newsletter block from the footer, since deleting it didn't seem to remove it? Any help would be appreciated.

4 Answers 4

6

In app/design/frontend/theme/theme/layout/newsletter.xml change from:

<reference name="footer">
    <block type="newsletter/subscribe" name="footer.newsletter" as="newsletter" before="footer_store_language" template="newsletter/subscribe.phtml"/>
</reference>

To:

<reference name="left">
    <block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml" before="-" />
</reference>
5
  • 1
    Try clearing cache, and reindexing Aug 14, 2014 at 7:29
  • Hi, Thanks. It's worked. you are a genius. thanks a lot. Aug 14, 2014 at 7:30
  • Please verify the answer if it worked. Aug 14, 2014 at 7:33
  • Hi, Sorry for late verify. I went for vacation.Thanks a lot again. Aug 18, 2014 at 4:18
  • check this link it's reference of all magneto default block name that can you remove any time.myphpinformation.blogspot.in/2015/05/…
    – coder
    May 28, 2015 at 11:48
1

Most probably this will be cache issue. Magento will cache footer section. So removing entire cache would solve this problem

Remove entire cache my removing entires inside var/cache

or

Try it through admin System > Cache Management > Flush Cache Storage

0
1

You can do this by direct php call.Create block programmatically of type newsletter/subscribe and set it template

<?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>
1

Call to app\design\frontend\default\yourTheme\layout\page.xml

<block type="newsletter/subscribe" name="newsletter" as="newsletter" template="newsletter/subscribe.phtml"/>

Call to Footer.phtml

<?php echo $this->getChildHtml('newsletter'); ?>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.