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\'','添加菜单');
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 }}?>