使用trs_channels来判断是否有子菜单:
<trs_channels id="owner" NUM="1">
<ul class="dropdown-menu">
<trs_channels id="PARENT">
<li><a href="<TRS_Channel id="owner" FIELD="_recurl" AUTOLINK="false"></TRS_Channel>"><TRS_Channel id="owner" FIELD="CHNLDESC" AUTOLINK="false"></TRS_Channel></a></li>
</trs_channels>
</ul>
</trs_channels>
完整代码:
<TRS_CONDITION REFERENCE="english" CONDITION="@chnlname" OPERATOR="contain">
<trs_channels id="channelid:1054">
<li class="enmenu dropdown
<trs_condition condition="@CHANNELID" reference="@PAGE.CHANNELID"> active</trs_condition>
<trs_condition condition="@CHANNELID" reference="${@PAGE.parent.parent.CHANNELID}"> active</trs_condition>
<trs_condition condition="@CHANNELID" reference="${@PAGE.parent.CHANNELID}"> active</trs_condition>
">
<a href="<TRS_Channel id="owner" FIELD="_recurl" AUTOLINK="false"></TRS_Channel>" class="dropdown-toggle" data-toggle="dropdown">
<TRS_Channel id="owner" FIELD="CHNLDESC" AUTOLINK="false"></TRS_Channel>
<trs_channels id="owner" NUM="1"><b class="caret"></b></trs_channels>
</a>
<trs_channels id="owner" NUM="1">
<ul class="dropdown-menu">
<trs_channels id="PARENT">
<li><a href="<TRS_Channel id="owner" FIELD="_recurl" AUTOLINK="false"></TRS_Channel>"><TRS_Channel id="owner" FIELD="CHNLDESC" AUTOLINK="false"></TRS_Channel></a></li>
</trs_channels>
</ul>
</trs_channels>
</li>
</trs_channels>
</trs_condition>
文章描述了如何通过TRS_CONDITIONREFERENCE和trs_channelsid判断是否显示子菜单,以及如何在HTML中构建带有下拉菜单的结构,如`dropdown-toggle`和`dropdown-menu`.



4770

被折叠的 条评论
为什么被折叠?



