在管理栏目中修改不需要显示的栏目“不在导航显示”
经过上面那样修改就不会在导航显示。下面说说另外种情况,就是首页循环某大栏目下面子栏目以及对应文章隐藏某个栏目。
代码如下:
{loop subcat(108,0,0,$siteid) $v} {php if($v['ismenu']==0) continue;} <div class="Our-services left marginbottom20"> <h2 class="f18 marginbottom5"><a href="{$v[url]}" title="{$v[catname]}">{$v[catname]}</a></h2> <div class="clear hidden" id="Our-services"> <ul class="hidden"> <div class="marginbottom10 hidden"> <span class="left"><a href="{$v[url]}"><img src="{$CATEGORYS[$v[catid]][image]}" width="50" height="50" /></a></span> <span class="right"> {pc:content action="lists" catid="$v[catid]" num="1" siteid="$siteid" order="inputtime DESC"} {loop $data $r} {php preg_match("/meta_description' => '(.+)'/", $CATEGORYS[$r[catid]][setting], $rs);} {str_cut(strip_tags($rs[1]),140,"...")} {/loop} {/pc} </span> </div> {pc:get sql="SELECT `title`,`url`,`inputtime`,`style` FROM `v9_gongzheng51com` where `catid`=$v[catid] ORDER BY `inputtime` DESC" num="5" return="data"} {loop $data $r} <li class="height30 hidden"><span class="right f12 cdgrey">{date('m-d',$r[inputtime])}</span><a href="{$r[url]}" target="_blank">{str_cut(strip_tags($r[title]),50,"")}</a></li> {/loop} {/pc} </ul> </div> </div> {/loop}
演示: