Blogger Information
Blog 6
fans 341
comment 0
visits 5866
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
导航栏目高亮显示最简单方案
大家讲道理的博客
Original
1148 people have browsed it

CommonController.class.php 构造方法中执行以下方法

       //栏目高亮显示
    public function curr(){
        $current=I('cateid');  //当前栏目的id
        $this->assign('current',$current);
    }

在header.html导航位置写

<div class="nav_main clearfix">
                <a href="__APP__" class="menu <if condition="$curr">current</if>">首 页</a>
                <volist name="cateres" id="vo">
                <a href="__MODULE__/<if condition="$vo['type'] eq 1">List<elseif condition="$vo['type'] eq 2" />Page<else />Topic</if>/index/cateid/{$vo.id}" class="menu <if condition="$current eq $vo['id']">current</if>">{$vo.catename}</a>
                </volist>
                <span class="icon_hot"></span>
            </div>


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post