首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >后端magento system.xml

后端magento system.xml
EN

Stack Overflow用户
提问于 2017-12-19 20:37:18
回答 1查看 227关注 0票数 0

我是magento的新手,我有很多问题。我正试图在后端添加一个新的部分,但是当我进入System->Configuration时,我收到了错误:

代码语言:javascript
复制
'This page is not working'

system.xml

代码语言:javascript
复制
<config>
<tabs>
    <packt>
        <label>Packt</label>
        <sort_order>400</sort_order>
    </packt>
</tabs>
<sections>
    <helloworld translate="label" module="helloworld">
        <label>Helloworld</label>
        <tab>packt</tab>
        <sort_order>10</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
        <groups>
        </groups>
    </helloworld>
</sections>

我必须指出,如果我删除了system.xml,系统->配置就会正常工作。

system.xml路径为:

app/code/local/Packt/HelloWorld/etc/system.xml

此外,adminhtml.xml不工作,因为它返回一个空的magento管理页面。我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2017-12-20 21:20:40

尝试以下代码:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<config>
        <tabs>
            <packt translate="label">
                <label>Packt</label>
                <sort_order>400</sort_order>
            </packt>
        </tabs>
        <sections>
            <helloworld translate="label" module="helloworld">
                <label>Helloworld</label>
                <tab>packt</tab>
                <sort_order>10</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>

                <groups>
                    <options translate="label" module="helloworld">
                        <label>Configuration</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>20</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <fields>
                            <mytext translate="label">
                                <label>My Text</label>
                                <frontend_type>text</frontend_type>
                                <sort_order>10</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>1</show_in_store>
                            </mytext>
                        </fields>
                    </options> 
                 </groups>
            </helloworld>
        <sections>
     </config>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47887225

复制
相关文章

相似问题

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