【发布时间】:2015-01-17 20:42:32
【问题描述】:
首先对不起我的英语真的很糟糕。
我正在尝试学习 magento。 问题是在管理面板中加载 PHTML 文件。 在菜单中,链接没问题,但我加载了一个空白页面。 BLOK 没问题,因为如果我加载字体就可以了。
这是我的文件:
/app/code/local/Package/HelloWorld/etc/config.xml
<admin>
<routers>
<helloworld><!-- nome modulo -->
<use>admin</use>
<args>
<module>Package_HelloWorld</module> <!-- namespace -->
<frontName>admintest</frontName><!-- path-->
</args>
</helloworld>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<helloworld>
<file>helloworld.xml</file><!-- file di layout, ricordiamoci che sta in /app/design/adminhtml/default/-->
</helloworld>
</updates>
</layout>
<menu><!-- aggiungo al menu del pannello-->
<helloworld translate="title" module="adminhtml">
<title>The Nano </title>
<sort_order>100</sort_order>
<children>
<set_time>
<title>Leggo da db</title>
<action>admintest/adminhtml_index</action>
</set_time>
</children>
</helloworld>
</menu>
</adminhtml>
/app/design/adminhtml/default/Package/layout/helloworl.xml
<layout version="0.1.0">
<helloworld_adminhtml_index_index>
<default name="content">
<block type="nomeblocco/nomebloccointerno" name="helloworld_scheda" template="helloworld/scheda.phtml"/>
</default>
</helloworld_adminhtml_index_index>
</layout>
PHTML 没问题,是:
/app/design/adminhtml/default/Package/template/helloworl/scheda.phtml
【问题讨论】: