Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MagentoXML时事通讯问题_Xml_Magento_Newsletter - Fatal编程技术网

MagentoXML时事通讯问题

MagentoXML时事通讯问题,xml,magento,newsletter,Xml,Magento,Newsletter,我试图在页面上添加一个xml时事通讯块。由于模板设置为将块放在主页上,因此我创建了一个cms页面,并更改了以下代码: 致: 我已经检查了Magento中的设置,新闻通讯模块已启用,但仍然没有出现在页面上。有人知道这是为什么吗?步骤1: 您创建一个cms/块并放置以下代码 {{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}} 步骤2:在任何这样的页面中调用cms/块。将下面的代码放在模板文件中的任

我试图在页面上添加一个xml时事通讯块。由于模板设置为将块放在主页上,因此我创建了一个cms页面,并更改了以下代码:

致:

我已经检查了Magento中的设置,新闻通讯模块已启用,但仍然没有出现在页面上。有人知道这是为什么吗?

步骤1: 您创建一个cms/块并放置以下代码

{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
步骤2:在任何这样的页面中调用cms/块。将下面的代码放在模板文件中的任意位置

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('YOUR IDENTIFIER')->toHtml() ?>

在你的cms页面下,点击通讯

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

谢谢你的回答。我已经打电话给block好了,让它出现了,但是实际的通讯盒没有显示出来。我创建了一个名为“时事通讯”的块,并在xml文件中使用了此代码。代码是:这些都正确吗?
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('YOUR IDENTIFIER')->toHtml() ?>
<reference name="content">
    <block type="newsletter/subscribe" name="home.newsletter" template="newsletter/subscribe.phtml"/> </reference>
<reference name="root">
    <block type="newsletter/subscribe" name="home.newsletter" as="home.newsletter" template="newsletter/subscribe.phtml"/>
</reference>
<?php echo $this->getChildHtml('home.newsletter') ?>