Magento adminhtml布局更新



我想在我的管理页面得到一个布局。

如果我做var_dump在我的控制器(Highor_Plugin_StatisticsController),然后我看到转储。

这是我目前所拥有的:

应用程序/代码/地方/Highor/插件/etc/config . xml

  <?xml version="1.0"?>
<config>
    <modules>
        <highor_plugin>
            <version>1.0.0</version>
            <depends>
                <!-- no dependencies -->
            </depends>
        </highor_plugin>
    </modules>
    <global>
        <models />
        <blocks />
        <resources />
        <extraconfig />
        <helpers>
            <highorplugin>
                <class>Highor_Plugin_Helper</class>
            </highorplugin>
        </helpers>
    </global>
    <admin>
        <routers>
            <highorplugin>
                <use>admin</use>
                <args>
                    <module>Highor_Plugin</module>
                    <frontName>highorplugin</frontName>
                </args>
            </highorplugin>
        </routers>
    </admin>
    <adminhtml>
        <layout>
            <updates>
                <highor_plugin>
                    <file>highorplugin.xml</file>
                </highor_plugin>
            </updates>
        </layout>
    </adminhtml>
</config>

app/设计/adminhtml/违约/违约/布局/highorplugin.xml

<?xml version="1.0"?>
<layout>
    <highorplugin_statistics_index>
        <reference name="content">
            <block type="core/template" name="highor" template="highor/plugin.phtml" />
        </reference>
    </highorplugin_statistics_index>
</layout>

应用程序/设计/前端/基地/违约/模板/highor/plugin.phtml

一些文本…

你的布局更新是为adminhtml区域,所以Magento正在adminhtml包/主题中搜索相应的模板,但你的模板在前端区域,所以它没有找到任何东西。

语法的其余部分看起来都很好,所以只需移动这个文件:

app/设计/前端/基地/违约/模板/highor/plugin.phtml

到此位置:

app/设计/ adminhtml/违约/违约/模板/highor/plugin.phtml

最新更新