jeecms子栏目或者文章页导航父栏目选中解决方法

时间:2022-11-24 06:05:11

jeecms在子栏目或者文章页导航父栏目选中,看例子

<div class="nav">
<ul>
[@cms_channel_list ]
<li [#if !channel??]class="active"[/#if]><a href="${base}/">首页</a></li>

[#list tag_list as c]
[#if channel??]
<li [#if channel.id==c.id||channel.nodeList[0].id==c.id]class="active"[/#if]><a href="${c.url}">${c.name}</a></li>
[#else]
<li><a href="${c.url}">${c.name}</a></li>
[/#if]
[/#list]
[/@cms_channel_list]
</ul>
</div>