我需要将简报注册从页脚移动到我在Magento 2.1.3安装后端创建的内容块中。
在Magento 1中你可以使用下面的代码但是使用Magento 2似乎不再是这样了
{{block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"}}
想知道是否有人有解决方案可以提供帮助。我正在开发的网站是china.testdev.tech,简报注册需要进入主页内容中间的蓝框。
提前致谢。
千电子伏
答案 0 :(得分:1)
在magento-2中要调用特定的phtml文件,您需要使用此代码。
{{block class="Magento\Newsletter\Block\Subscribe" name="home.form.subscribe" template="Magento_Newsletter::subscribe.phtml"}}