我有一個模塊名稱空間/搜索,當我到達此處時安裝了該模塊。我從它裏面取了< [namespace] _index_index>內容並在此處顯示。這是來自當前正在工作的模塊。模板不適用於自定義前端模塊
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block type="search/search" name="search" template="ifi_search/index.phtml" />
</reference>
我已經使用上述作爲helloworld模塊的模板。
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block type="helloworld/helloworld" name="helloworld" template="helloworld/helloworld.phtml" />
</reference>
隨着我留下了一個完全空白頁第二個例子中,開發人員模式已開啓。爲了擴大我對這個主題的知識,我沒有任何其他的信息可以用於調試。如果添加了任何有用的內容,請發表評論。我不確定是否可以在這一點上重現此問題。
根據頁面頂部的警告,該文章包含一些令人討厭的信息,即使信息沒有過期。也就是說,根據下面的@benmarks,如果你像這樣替換了根塊,並且Magento可以做到這一點,你需要一個output =「toHtml」屬性。 –
我正在運行一箇舊版本的Magento,所以我沒有看到文章被告知是問題。我不是複製我的,而是複製了第二個示例中的部分代碼並進行了編輯,但我一定在事故中刪除了output =「toHtml」,但沒有意識到它。我已經嘗試了幾種不同的變體,以及IndexController中的幾種不同的方法。我發現做的工作是使用 page.phtml/ –
Sturm