【问题标题】:Adding a new option to the magento CMS [closed]向 magento CMS 添加新选项 [关闭]
【发布时间】:2013-07-19 07:47:57
【问题描述】:

对于一个 magento 网上商店,我们创建了一个自定义模块。现在我们想将此模块的配置选项添加到 magento cms 中,以便可以在那里进行配置。

谁能告诉我如何去做这件事?

任何帮助将不胜感激。

【问题讨论】:

  • 您只想为模块添加配置选项?这样您就可以稍后在代码中使用该配置设置?
  • 基本上我想知道的是,我如何在magento的cms菜单中创建一个新选项。
  • cms是一个模块,由page、block、widget、poll和banner组成,每一个都有2-3个菜单。那么您想在哪里添加新选项?

标签: magento content-management-system customization


【解决方案1】:

你必须创建一个 system.xml 文件

<config>
    <sections>
        <company_modulename translate="label" module="company_modulename">
            <label>Company</label>
            <frontend_type>text</frontend_type>
                <groups>
                    <yourconfiggroup translate="label">
                        <label>Your Config Group</label>
                        <frontend_type>text</frontend_type>
                        <fields>
                            <youroption translate="label comment">
                                <label>Your Option</label>
                                <comment><![CDATA[Your Option]]></comment>
                                <frontend_type>select</frontend_type>
                            </youroption>
                        </fields>
                    </yourconfiggroup>
                </groups>
        </company_modulename>
    </sections>
</config>

注意也允许从 adminhtml.xml 访问此部分。

【讨论】:

  • 感谢您的快速答复,这正是我所需要的
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-22
  • 1970-01-01
  • 2015-01-26
  • 1970-01-01
  • 2016-06-13
  • 1970-01-01
相关资源
最近更新 更多