首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Magento adminhtml布局更新

Magento adminhtml布局更新
EN

Stack Overflow用户
提问于 2014-07-20 19:03:05
回答 1查看 9.2K关注 0票数 2

我正试图在我的管理页面中得到一个布局。

如果我在控制器中执行var_dump (Highor_Plugin_StatisticsController),则会看到转储。

到目前为止,这就是我所拥有的:

app/code/local/Highor/Plugin/etc/config.xml

代码语言:javascript
复制
  <?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/design/adminhtml/default/default/layout/highorplugin.xml

代码语言:javascript
复制
<?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>

app/design/frontend/base/default/template/highor/plugin.phtml

一些短信..。

EN

回答 1

Stack Overflow用户

发布于 2014-07-20 23:38:21

您的布局更新是针对 adminhtml 区域的,因此Magento在adminhtml包/主题中搜索相应的模板,但是模板位于前端区域,因此没有找到任何内容。

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

app/design/frontend/base/default/template/highor/plugin.phtml

到这个地点:

app/design/adminhtml/default/default/template/highor/plugin.phtml

而且它应该能正常工作。

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24853882

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档