获取指定字典的子项列表
${cms.GetItemsByDictID(int intDictID[/string strDictName])}
参数 | 描述 |
---|---|
int intDictID[/string strDictName] | 字典ID或者字典名称 |
返回指定字典的子项列表。
提示:需要在后台管理中设置系统配置-数据字典。
#foreach($item in ${cms.GetItemsByDictID(1)}) 键值对:${item.KeyName} - ${item.KeyValue} <br /> #end
输出:
键值对:China - 中国 键值对:American - 美国