我想知道如何找到某個頁面的塊類型示例:主頁。獲取頁面的塊類型Magento
我在我的網頁有問題,我想展示一些塊,在XML中,我宣佈我的塊<cms_index_index>
(local.xml中),但如果我把它放在它出現在<reference name="head">
,如果<reference name="content">
或<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'); – Prince