Home    Articles

 

How to add newsleter subscribe form to phtml file without xml config

 

Here is a simple way to add the newsletter block anywhere you want. The newsletter form is located by default in left side but you may need it into footer, rightside or somewhere else.

Here is an example of how you can do that by adding some code into phtml file:

( it is more reliable and faster..you also cand play with it as you want )

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

Add this line and the newsletter form will be there.

by