big_menu菜单设置

1.页面
<script>
$(function(){
$('.subnav .content-menu .on').after('<a class="add fb" style="margin-left:8px;" href="?m=weixin&c=weixin&a=wx_menu_publish"><em>发布菜单</em></a>');
})
</script>
2.后台
$big_menu = array('javascript:window.location.href=\'m=weixin&c=weixin&a=wx_menu_add\'','添加菜单');
big_menu菜单设置
3.弹窗形式
$big_menu = array('javascript:window.top.art.dialog({id:\'add\',iframe:\'?m=school&c=index&a=school_add\', title:\''.L('添加').'\', width:\'700\', height:\'450\'}, function(){var d = window.top.art.dialog({id:\'add\'}).data.iframe;var form = d.document.getElementById(\'dosubmit\');form.click();return false;}, function(){window.top.art.dialog({id:\'add\'}).close()});void(0);', L('添加'));
4.多类菜单(去除栏目按钮)
方法文件代码:
$big_menu = array(
array('javascript:window.location.href=\'?m=school&c=index&a=school_add\'', L('add')),
array('javascript:window.location.href=\'?m=school&c=index&a=school_add\'', L('bbb'))
);
页面header.html代码(判断1维数组,还是二维数组)
<?php if(count($big_menu) == count($big_menu, 1)){?>
            <?php if(isset($big_menu)) { echo '<a class="add fb" href="'.$big_menu[0].'"><em>'.$big_menu[1].'</em></a> ';} else {$big_menu = '';} ?>
            <?php //echo admin::submenu($_GET['menuid'],$big_menu); ?>
<?php }else{?>
        <?php foreach($big_menu as $v) { ?>
            <?php if(isset($v)) { echo '<a class="add fb" href="'.$v[0].'"><em>'.$v[1].'</em></a> ';} else {$v = '';} ?>
            <?php //echo admin::submenu($_GET['menuid'],$v); ?>
<?php }}?>
big_menu菜单设置
上一篇:list、set、map区别


下一篇:Sql日期时间格式转换;取年 月 日,函数:DateName()、DATEPART()