迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架, 基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
大佬们 列表页 如何给二级栏目加高亮样式
{category module=share pid=37} {$t.name}{/category}
{category module=share pid=37} {if in_array($t.id, $cat.catids)} 是当前栏目 {/if} {$t.name} {/category}
{category module=share pid=37} {if in_array($t.id, $cat.catids)} 给二级栏目加高亮 {/if} {$t.name} {/category}
{category module=share pid=37} /if}> {$t.name} {/category}
{category module=share pid=37} <a href="{$t.url}" {if in_array($t.id,$cat.catids)} class="active" {/if}> {$t.name} </a> {/category} 代码是这样
{if $t.id == $catid} 给二级栏目加高亮 {/if}
没啥用啊 {category module=share pid=37} <a href="{$t.url}" {if $t.id == $catid} class="active" {/if} >{$t.name}</a> {/category} 展示出来的效果是
{category module=share pid=37} <a target="_blank" href="{$t.url}" {if IS_SHARE && $catid && in_array($catid, $t.catids)} class="active"{/if}> {$t.name} </a> {/category}
就像这种
{category module=share pid=37} {$t.name}{/category}代码是这样的{category module=share pid=37} {if in_array($t.id, $cat.catids)} 是当前栏目 {/if} {$t.name} {/category}{category module=share pid=37} {if in_array($t.id, $cat.catids)} 给二级栏目加高亮 {/if} {$t.name} {/category}很简单的逻辑{category module=share pid=37} /if}> {$t.name} {/category}没用啊都显示的是高亮
{category module=share pid=37} <a href="{$t.url}" {if in_array($t.id,$cat.catids)} class="active" {/if}> {$t.name} </a> {/category} 代码是这样{if $t.id == $catid} 给二级栏目加高亮 {/if}没啥用啊 {category module=share pid=37} <a href="{$t.url}" {if $t.id == $catid} class="active" {/if} >{$t.name}</a> {/category} 展示出来的效果是靠悬赏(设置悬赏)赚钱买授权{category module=share pid=37} <a target="_blank" href="{$t.url}" {if IS_SHARE && $catid && in_array($catid, $t.catids)} class="active"{/if}> {$t.name} </a> {/category}