迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架, 基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
我想 在首页和 某个模型的首页 显示 class="bg_gray"。 这块怎么写呢?放进header.html里面
<body {if ($indexc || $t.dirname==news) }class="bg_gray"{/if} >
<body {if ($indexc || ($t.dirname==news && $indexm)) }class="bg_gray"{/if} >
<body {if ($indexc || ($indexm)) }class="bg_gray"{/if} >
{if ($ci->router->class == "category") }class="bg_gray"{/if}
{if ($ci->router->class == "show") }class="bg_gray"{/if}
自定义页
{if ($ci->router->class == "page") }class="bg_gray"{/if}
列表
内容页
{if ($indexc) }class="bg_gray"{/if}
{if ($indexm) }class="bg_gray"{/if}
{if $indexc} <body class="bg_gray" > {elseif $indexm} <body class="bg_gray" > ..继续elseif {else} <body class="" > 默认 {/if}
<body {if $indexc || ($indexm && MOD_DIR=="news")}class=" bg_gray"{/if} >
在首页、news模型的首页 显示 class="bg_gray"。
<body {if MOD_DIR=="news"}class=" bg_gray"{/if} >
<body {if ($indexc || $t.dirname==news) }class="bg_gray"{/if} >我上面的这种写法 不显示啊,news模型页面<body {if ($indexc || ($t.dirname==news && $indexm)) }class="bg_gray"{/if} >全局写法<body {if ($indexc || ($indexm)) }class="bg_gray"{/if} >{if ($ci->router->class == "category") }class="bg_gray"{/if}内容页
{if ($ci->router->class == "show") }class="bg_gray"{/if}自定义页
{if ($ci->router->class == "page") }class="bg_gray"{/if}列表
{if ($ci->router->class == "category") }class="bg_gray"{/if}内容页
{if ($ci->router->class == "show") }class="bg_gray"{/if}首页{if ($indexc) }class="bg_gray"{/if}模块首页{if ($indexm) }class="bg_gray"{/if}{if $indexc} <body class="bg_gray" > {elseif $indexm} <body class="bg_gray" > ..继续elseif {else} <body class="" > 默认 {/if}<body {if ($indexc || ($indexm)) }class="bg_gray"{/if} ><body {if $indexc || ($indexm && MOD_DIR=="news")}class=" bg_gray"{/if} >在首页、news模型的首页 显示 class="bg_gray"。
<body {if $indexc || ($indexm && MOD_DIR=="news")}class=" bg_gray"{/if} >news 这个模型里面 包括首页 列表页 和内容页都 显示
<body {if MOD_DIR=="news"}class=" bg_gray"{/if} >这是附加的