我能够通过在 TS 中使用 CASE 对象来完成这项工作。这是示例代码:
temp.meni0= HMENU
temp.meni0.special = list
temp.meni0.special.value = 5417, 5418, 5419, 5420, 5421
temp.meni0.wrap = <div class="dropdown_5columns"><div class="col_1"><ul>|</ul></div></div>
temp.meni0.1 = TMENU
temp.meni0.1{
expAll = 1
NO {
allWrap = <li>|</li>
#ATagParams.insertData = 1
#ATagParams = class="drop"
}
}
temp.meni6= HMENU
temp.meni6 < temp.meni0
temp.meni6.special.value = 5431, 5432, 5433, 5434, 5435
temp.meni6.wrap = <div class="dropdown_5columns m-144"><div class="col_1"><ul>|</ul></div></div>
temp.meni7= HMENU
temp.meni7 < temp.meni0
temp.meni7.special.value = 5456, 5457, 5458, 5459, 5460
temp.meni7.wrap = <div class="dropdown_5columns m-288"><div class="col_1"><ul>|</ul></div></div>
temp.meni8= HMENU
temp.meni8 < temp.meni0
temp.meni8.special.value = 5466, 5467, 5470, 5471, 5472
temp.meni8.wrap = <div class="dropdown_5columns m-432"><div class="col_1"><ul>|</ul></div></div>
lib.meni= HMENU
lib.meni.special = list
lib.meni.special.value = 5395, 5396, 5397, 5398
lib.meni.wrap = <ul id="menu" style="display:none;">|</ul>
lib.meni.1 = TMENU
lib.meni.1{
expAll = 1
NO {
allWrap = <li>|</li>
ATagParams.insertData = 1
ATagParams = class="drop _{field:uid}"
#after.cObject < temp.meni5
after.cObject = CASE
after.cObject {
key.field = uid
default = TEXT
default.value = <span>NIJE OK!</span>
5395 < temp.meni0
5396 < temp.meni6
5397 < temp.meni7
5398 < temp.meni8
}
}
}
有了这个,我可以为 lib.menu 的每个菜单项(页面)插入非常具体的子菜单