cms icon indicating copy to clipboard operation
cms copied to clipboard

请教文章内容页面 有个当前栏目列表的导航,如何判断当前页面被选中?

Open justonly2060 opened this issue 2 years ago • 5 comments

`

    <stl:contents channelName="{channel.FullTitle}" scope="all" order="addDateBack">
  • <stl:if context="content" type="Title" operate="Equals" value="{content.Title}"> stl:yes <stl:a title="{Content.FullTitle}" class="active" >{Content.Title}
    </stl:a> </stl:yes> stl:no <stl:a title="{Content.FullTitle}">{Content.Title}
    </stl:a> </stl:no> </stl:if>
  • </stl:contents>
`

justonly2060 avatar Jun 13 '22 05:06 justonly2060

想在文章内容页 里面的 列表 中,高亮当前的文章项

justonly2060 avatar Jun 13 '22 06:06 justonly2060

参考一下这个吧 <stl:channels channelName="工程展示" parent="true"> <stl:itemTemplate type="Item"> stl:a <stl:channel type="title"></stl:channel> </stl:a> </stl:itemTemplate> <stl:itemTemplate type="SelectedItem" selected="current"> <stl:a style="color: #fff;background: #0084f1;"> <stl:channel type="title"></stl:channel> </stl:a> </stl:itemTemplate> </stl:channels>

GanSir avatar Jun 14 '22 06:06 GanSir

<stl:a class="{stl:if type=current yes=hover}"></stl:a>请参照这个

sjpl00 avatar Oct 20 '22 15:10 sjpl00