body if ($indexc || $t.dirname==news) class=bg_gra 开源系统 更新 2018-08-09 20:48:43 迅睿粉丝 我想 在首页和 某个模型的首页 显示 class="bg_gray"。 这块怎么写呢?放进header.html里面
<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} >这是附加的