1

ここに到達したときにインストールされたモジュールNamespace/Searchがあります。<[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>

2番目の例では、完全に空白のページが残っており、開発者モードがオンになっています。このトピックに関する私の知識の範囲内で、デバッグのために提示する他の情報はありません。追加した場合に役立つことがあれば、コメントしてください。この時点でこの問題を再現できるかどうかはわかりません。

4

1 に答える 1

3

outputブロック宣言に属性を追加する必要があります。

<block type="page/html" name="root" template="simple_page.phtml" output="toHtml"/>

これにより、ブロックが出力ブロックとしてマークされ、ブロックレンダリングメソッドがに設定されtoHtml()ます。出力ブロックは、への呼び出しのエントリポイントをレンダリングしていますMage_Core_Controller_Varien_Action->renderLayout()

于 2012-06-14T17:19:02.157 に答える