联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
列表页二级分类如何写
类型:迅睿CMS 更新时间:2024-01-13 14:05:47


 列表页二级分类如何写:


               <div class="item">
                    <span class="tit">一级分类:</span>
                    <div class="mb-sx">{category module=share pid=$parent.id}
                        <a href="{$t.url}" class="btn {if $t.id==$cat.id}on{/if}">{$t.name}</a>{/category}
                    </div>
                </div>
                <div class="item">
                    <span class="tit">二级分类:</span>
                    <div class="mb-sx">{category module=share pid=$parent.id}
                        <a href="{$t.url}" class="btn {if $t.id==$cat.id}on{/if}">{$t.name}</a>{/category}
                    </div>
                </div>


回帖
  • 迅睿开源社区技术-小陌
    #1楼    迅睿开源社区技术-小陌
    2024-01-13 14:05:47
    Chrome 0
                   <div class="item">
                        <span class="tit">一级分类:</span>
                        <div class="mb-sx">{category module=share pid=0}
                            <a href="{$t.url}" class="btn {if $t.id==$cat.id}on{/if}">{$t.name}</a>{/category}
                        </div>
                    </div>
                    <div class="item">
                        <span class="tit">二级分类:</span>
                        <div class="mb-sx">{category module=share pid=$cat.id}
                            <a href="{$t.url}" class="btn {if $t.id==$cat.id}on{/if}">{$t.name}</a>{/category}
                        </div>
                    </div>