三级栏目名称及链接

复制代码
<!-- 一级栏目名称 -->
<h1>{eyou:channelartlist typeid='$eyou.field.typeid|gettoptype=###,typeid'}{eyou:field name='typename' /}{/eyou:channelartlist}</h1>
<!--二级栏目开始-->
{eyou:channel type="first" currentstyle="active"}
    {eyou:eq name='$eyou.field.grade' value='2'}
        {eyou:type typeid='$eyou.field.typeid' id='field1'}
            {eyou:eq name='$field1.parent_id' value='$field.id'}
                {eyou:assign name='$field.currentstyle' value='current' /}
                <!--current对应样式中的display:block-->
            {/eyou:eq}
        {/eyou:type}
    {/eyou:eq}
    <h2 class="{$field.currentstyle}">{$field.typename}</h2><!-- 二级栏目名称 -->
    <!--三级栏目开始-->
    {eyou:notempty name="$field.children"}
        {eyou:channel name="$field.children" id="field2"}
        <h3><a href="{$field2.typeurl}" class="{$field2.currentstyle}">{$field2.typename}{$field2.typeid}<!-- 三级栏目名称 --></a></h3>
        {/eyou:channel}
    {/eyou:notempty}
{/eyou:channel}
复制代码

 

posted @   浅岛连云  阅读(556)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示