Search code examples
magento-1.4magento-1.5magento

how to call newsletter/subscribe.phtml on cms/content_home.phtml?


I want to make a newsletter subscription box on home page in content area, and for that I have made a CMS page that other code I have placed in the newsletter subscription file can call too.

I am trying to call it like this:

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

but it does not show up.

Why ?


Solution

  • system -> configuration -> advanced
    

    from there enable newsletter module. and then you can use the above code to call it anywhere.

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