【发布时间】:2017-05-01 17:33:44
【问题描述】:
我想知道如何找到某些页面示例的块类型:主页。
我的主页有问题,我想在 xml 中显示一些块,我在 <cms_index_index> (local.xml) 中声明了我的块,但如果我把它放在 <reference name="head"> 中,它会出现,如果 @987654323 @ 或 <reference name="content"> 它不起作用。在我看来,块的类型不好。
xml:
<cms_index_index>
<reference name="root">
<block type="core/template" name="seconnecter_test" template="customer/form/test-seconnecter.phtml"/>
</reference>
</cms_index_index>
在主页 1column-full.phtml 我这样称呼它:
<?php echo $this->getChildHtml('seconnecter_test');?>
【问题讨论】:
-
解决方案:$this->getBlockHtml('name_block');
标签: magento magento-1.7 magento-1.9 magento-1.8 magento-1.4