I'm working on a website and my page doesn't show the subscribe form...
I've added this to my newsletter.xml:
<!-- Mage_Newsletter -->
<reference name="newsletter">
<block type="newsletter/subscribe" name="news.subscribe" as="news.subscribe" template="newsletter/subscribe.phtml"/>
</reference>
</default>
and this to my news_home.phtml:
<section id="news_and_fun_home" class="block small">
<div class="block-top"></div>
<div class="block">
<a href="https://plus.google.com/u/0/105681634975039284210/posts" target="_blank"><div class="follow-google"></div></a>
<?php echo $this->getChildHtml('news.subscribe'); ?>
</div>
<div class="block-bottom"></div>
</section>
i'm kinda new in magento... Can someone explain me what to do exactly?
Also this isnt working:
<?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>
First of all ,check the news_home.phtml
file reference name is newsletter
in xml file if,you to show this block then then you should call
<?php echo $this->getChildHtml("news.subscribe"); ?>
in reference block newsletter (<reference name="newsletter">)
's phtml file
in newsletter.xml:
<default>
<!-- Mage_Newsletter -->
<reference name="left">
<block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"/>
</reference>
</default>
in news_home.phtml:
<section id="news_and_fun_home" class="block small">
<div class="block-top"></div>
<div class="block">
<a href="https://www.facebook.com/sluban.nl" target="_blank"><div class="follow-facebook"></div></a>
<a href="https://twitter.com/slubaneurope" target="_blank"><div class="follow-twitter"></div></a>
<a href="https://plus.google.com/u/0/105681634975039284210/posts" target="_blank"><div class="follow-google"></div></a>
<?php echo $this->getLayout()
->createBlock("newsletter/subscribe")
->setTemplate("newsletter/subscribe.phtml")
->toHtml();
?>
</div>
And check in your magento/app/design/frontend/Your Theme/default/layout/local.xml
if found below line then comment it:
<remove name="left.newsletter"/>
Found the problem... It was a disabled option in the backend of magento.