配置选项卡

1、配置文件config.php

/**配置导航**/
    'ADMIN_NAV' => array(
        array('title'=>'用户信息','url'=>"?s=/Home/Index/index",'class'=>''),
        //array('title'=>'奖品添加','url'=>"?s=/Home/Index/addprize",'class'=>''),
        array('title'=>'中奖记录','url'=>"?s=/Home/Index/rewardlog",'class'=>''),
    ),

2、html端

<div class="Nav">
        <ul>
            <?php
            if($adminNav){
                foreach($adminNav as $k=>$v){
            echo '<li class="'.$v['class'].'"><a href="'.$v['url'].'">'.$v['title'].'</a></li>';
            }
            }
            ?>
        </ul>
    </div>

3、php端

 $adminNav = C('ADMIN_NAV');
        $adminNav[1]['class'] = 'cur';
        $this->assign('adminNav',$adminNav);

 

posted @ 2015-12-31 11:55  FinnYY  阅读(208)  评论(0编辑  收藏  举报