이 대답은 Static block on home page in Magento이지만 작동하지 않습니다.Magento 홈 페이지에 맞춤 블록 표시
그냥 내 홈페이지에 맞춤 블록을 추가하려고합니다. 이것들은 내가 한 일들입니다 :
1이 파일을 레이아웃 파일에 추가하십시오.
<cms_index_index>
<reference name="content">
<block type="aitshopassist/assistant" name="aitshopassist_assistant" template="aitshopassist/assistant.phtml">
<action method="setBlockId"><block_id>shop_assistant_block</block_id>
</action>
</block>
</reference>
</cms_index_index>
2-
는 2columns-right.phtml 파일이 추가 :<?php echo $this->getChildHtml('shop_assistant_block') ?>
또한, 블록 catalog_category_view 올바르게 나타낸다.
무엇이 누락 되었습니까? 블록 호출하기위한 XML 파일의
<catalog_category_view>
<reference name="content">
<block type="aitshopassist/assistant" name="aitshopassist_assistant" template="aitshopassist/assistant.phtml" before="category.products" />
</reference>
</catalog_category_view>
나는 cms_index_index 그러나 didnt 한 작업이 시도
는 ..
'getChildHtml' 메쏘드는'name' 값을 봅니다.'aitshopassist_assistant'는'shop_assistan t_block'. 이것이'catalog_category_view'에서 어떻게 올바르게 보이고 있습니까? 거기에 팝하는 데 사용한 레이아웃 업데이트를 붙여 넣을 수 있습니까? – kalenjordan
질문을 편집합니다. 레이아웃에 대한 카탈로그 코드가 있습니다. 고맙습니다 – davibq