3 Different way to call Newsletter block in magento 1.9

Newsletter is the main block when you are creating online store for sell products. Using Newsletter you can invite new customer for visit store and also its help to keep attached your current customers.

You can call newsletter block and even other default block using 3 methods.

1.) Call Direct in CMS page or static block

2.) Call in .phml file

3.) Call using XML reference.

For Call direct in CMS you can use below code.

{{block type="core/template" template="newsletter/subscribe.phtml"}}

You can use below code for display direct in .phtml file

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

Also you can use below XML code.

<reference name="footer>
<block type="newsletter/subscribe" before="-" name="right.newsletter" template="newsletter/subscribe.phtml"/>
Rakesh Patel on sabtwitterRakesh Patel on sabrssRakesh Patel on sabgoogleRakesh Patel on sabgithubRakesh Patel on sabfacebookRakesh Patel on sabemail
Rakesh Patel
Website Devloper at Divine Web Technology
Hello Viewers,
My self Rakesh Patel, And i am website developer from last 6+ Year, I am working as a full time freelancer from last 2years. My skills are Core PHP, Wordpress, Magento, HTML, CSS, Joomla, Drupal, Smarty.

I really like to share my skill to all my developer friends, And also request you all, Please share your skill here so other developer can get help.

Leave a Reply

Your email address will not be published. Required fields are marked *