Magento 1.9:dynamic config.xml
我正在创建一个Magento 1.9模块,到目前为止已经定义了设置(可以使用),然后我继续为我的设置字段添加默认值。现在,我想知道,在配置中是否有可能有一个值链接到其他值?与中一样,我希望为字段添加默认设置,其中值将是站点名称或站点描述。创建system.xml并使用以下示例代码:Magento 1.9:dynamic config.xml,magento,magento-1.9,Magento,Magento 1.9,我正在创建一个Magento 1.9模块,到目前为止已经定义了设置(可以使用),然后我继续为我的设置字段添加默认值。现在,我想知道,在配置中是否有可能有一个值链接到其他值?与中一样,我希望为字段添加默认设置,其中值将是站点名称或站点描述。创建system.xml并使用以下示例代码: <?xml version="1.0"?> <config> <sections> <folder translate="label" module=
<?xml version="1.0"?>
<config>
<sections>
<folder translate="label" module="modulename">
<groups>
<site_details>
<label>Website discription</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<name translate="label">
<label>Site name</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</name>
<description>
<label>description</label>
<comment><![CDATA[description]]></comment>
<frontend_type>textarea</frontend_type>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</description>
</fields>
</site_details>
</groups>
</floder>
</sections>
</config>
网站描述
文本
1.
1.
1.
1.
站点名称
文本
1.
1.
1.
1.
描述
文本区
2.
1.
1.
1.
创建system.xml并使用以下示例代码:
<?xml version="1.0"?>
<config>
<sections>
<folder translate="label" module="modulename">
<groups>
<site_details>
<label>Website discription</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<name translate="label">
<label>Site name</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</name>
<description>
<label>description</label>
<comment><![CDATA[description]]></comment>
<frontend_type>textarea</frontend_type>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</description>
</fields>
</site_details>
</groups>
</floder>
</sections>
</config>
网站描述
文本
1.
1.
1.
1.
站点名称
文本
1.
1.
1.
1.
描述
文本区
2.
1.
1.
1.
我投票结束这个问题,因为堆栈溢出是一个问答网站。你的问题不是关于编程。也许你应该把它贴上去?你说的“这不是关于编码”是什么意思?我的问题基本上是如何对我在那里提出的问题进行编码。我真的一点也不理解你的评论。是因为我没有提供任何代码吗?这不会有任何帮助,这就是为什么我没有。听起来你好像在问Magento的配置设置。就我所知,这里没有关于编码的内容。你能试着编写尽可能多的解决方案吗?然后,我们发现你被卡住了,拿着你的代码回来,然后再问一次?好吧,问题是,刚才,我已经准备好了所有的东西,正在工作。问题是,我想问的是,这是否可以编码。你读过我的问题了吗?是的,除了你说你正在创建一个模块外,没有关于编码的内容。这本身并不是编码。你需要显示你的代码和哪里出了问题。我们不是代码编写或代码设计服务。我们在这里帮助您解决您的特定编程问题。我投票结束这个问题,因为堆栈溢出是一个问答网站。你的问题不是关于编程。也许你应该把它贴上去?你说的“这不是关于编码”是什么意思?我的问题基本上是如何对我在那里提出的问题进行编码。我真的一点也不理解你的评论。是因为我没有提供任何代码吗?这不会有任何帮助,这就是为什么我没有。听起来你好像在问Magento的配置设置。就我所知,这里没有关于编码的内容。你能试着编写尽可能多的解决方案吗?然后,我们发现你被卡住了,拿着你的代码回来,然后再问一次?好吧,问题是,刚才,我已经准备好了所有的东西,正在工作。问题是,我想问的是,这是否可以编码。你读过我的问题了吗?是的,除了你说你正在创建一个模块外,没有关于编码的内容。这本身并不是编码。你需要显示你的代码和哪里出了问题。我们不是代码编写或代码设计服务。我们在这里帮助您解决特定的编程问题。