是否可以通过displayCond或其他方式更改一个设置中的项目?
示例:
<settings.setting1>
<TCEforms>
<label>Label</label>
<onChange>reload</onChange>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">Item 1</numIndex>
<numIndex index="1">item 1</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">Item 2</numIndex>
<numIndex index="Item 2">children</numIndex>
</numIndex>
</items>
<maxitems>1</maxitems>
<size>1</size>
</config>
</TCEforms>
</settings.setting1>
<settings.setting2>
<TCEforms>
<label>Label</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">Only if setting1 is Item 1</numIndex>
<numIndex index="1">item1</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">Only if setting1 is item2</numIndex>
<numIndex index="1">item2</numIndex>
</numIndex>
</items>
<maxitems>1</maxitems>
</config>
</TCEforms>
</settings.setting1>
如果setting1
是item1
,那么setting2
是否可能只显示item1
?还是应该使用两种不同的设置?
是的,如文件所示,这是可能的:
<displayCond>FIELD:settings.setting1:=:item1</displayCond>