桂电在线-php-提取菜单到配置文件2
继续昨晚没完成的主菜单模板:
<!-- 菜单块 -->
<div class="on-light" id="menus">
<?php foreach ($menus as $menu_key => $menu): ?> <?php
// 排除校园名片
if ($menu_key == 'card')
break;
?> <section class="container" id="<?=$menu_key?>-menus">
<header class="col-xs-12 text-center">
<h2 class="bs-docs-featurette-title"><?=$menu['name']?></h2>
<p class="lead"><?=$menu['description']?></p>
</header> <div class="row bs-docs-featured-sites"> <?php foreach( $menu['submenus'] as $key => $submenu ): ?>
<?php $i = $key + 1; ?>
<div class="col-xs-6 col-sm-3">
<a href="<?=site_url( $submenu['link'] )?>" class="menu menu<?=$i?>"><?=$submenu['name']?></a>
</div> <?php
// 如果存在下一个子菜单 && 取模等于0
$next_sm = next($menu['submenus']);
?>
<?php if( isset($next_sm) && $i % 4 == 0 ): ?>
</div>
<div class="row bs-docs-featured-sites">
<?php endif ?> <?php endforeach ?> </div>
</section>
<?php endforeach ?> <section class="container" id="cards-menus">
<header class="col-xs-12 text-center">
<h2 class="bs-docs-featurette-title">校园名片</h2>
<p class="lead">校内朋友圈,你可能认识他们喔!?</p>
</header>
<!-- 杰出校友 -->
<div class="row text-right">
<div class="col-xs-12 text-right">
<a href="" class="btn btn-primary">
更多校友
<i class="glyphicon glyphicon-chevron-right"></i>
</a>
</div>
</div>
<div class="row bs-docs-featured-sites">
<div class="col-xs-6 col-sm-3">
<a href="">
<img src="<?=__PUBLIC__?>images/test.jpg" alt="" class="img-responsive"/></a>
</div>
<div class="col-xs-6 col-sm-3">
<a href="">
<img src="<?=__PUBLIC__?>images/test.jpg" alt="" class="img-responsive"/></a>
</div>
<div class="col-xs-6 col-sm-3">
<a href="">
<img src="<?=__PUBLIC__?>images/test.jpg" alt="" class="img-responsive"/></a>
</div>
<div class="col-xs-6 col-sm-3">
<a href="">
<img src="<?=__PUBLIC__?>images/test.jpg" alt="" class="img-responsive"/></a>
</div>
</div>
</section>
</div>
总结一下:
1.取模计数计数从1开始
2.权限点和菜单分开,需创建权限点文件
桂电在线-php-提取菜单到配置文件2的更多相关文章
- 桂电在线-php-提取菜单到配置文件
新建存储菜单的配置文件 menus.php,并配置菜单 <?php if ( ! defined('BASEPATH')) exit('No direct script access allow ...
- 桂电在线-转变成bootstrap版3(记录学习bootstrap)
继续上文 正文菜单 html: <!-- 菜单块 --> <div class="on-light" id="menus"> <s ...
- 桂电在线-转变成bootstrap版2(记录学习bootstrap)
下载bootstrap框架https://github.com/twbs/bootstrap 或者 http://getbootstrap.com/ 拷贝模板 修改基本模板 语言zh-cn,标题,描述 ...
- 桂电在线-转变成bootstrap版
由于angularjs的不熟悉,而且SEO需要学习更多东西,于是先采用bootstrap版本,毕竟工作上也需要使用bootstrap,然后参照视频教程学习. bootstrap 基本模板 <!D ...
- 桂电在线_微信公众平台开发之-运用angularjs显示学校公告新闻列表和详情页面
折腾angularjs的感悟 几天折腾,总的来说看了很多博客,要么不是最新的技术文档,要么写得不够完整,因为别人是基于他们的理解写的技术博客代码不一定会贴完整,所以一旦你用的是最新的想要看完整的实例就 ...
- Ubuntu Linux 使用桂电校园网 上网
2016年9月1日 星期四 桂电校园网今天升级新的出校器,旧的出校器已经不能使用,所以本篇博客已经过期,下面的方法已经不能让Ubuntu使用桂电校园网上外网了.详细的原因,请到这个网站查看:校园网计费 ...
- GRUB2配置详解:默认启动项,超时时间,隐藏引导菜单,配置文件详解,图形化配置
配置文件详解: /etc/default/grub # 设定默认启动项,推荐使用数字 GRUB_DEFAULT=0 # 注释掉下面这行将会显示引导菜单 #GRUB_HIDDEN_TIMEOUT=0 # ...
- 桂电在linux、Mac OS环境下使用出校器(支持2.14)
这是guetsec学长在三院科协学长所抓包逆向分析1.81版出校器的基础上,用python写的一款为Mac和linux环境开发的出校器. 最后我做了略微修改,支持暂时最新版本2.14.下面有直接从源码 ...
- 桂电在linux环境下使用出校器
一.官方出校器(无界面) 由于学校官方最新的linux版出校器无效,我们只能使用老版本的出校器了. 但因为老版本的出校器是32位的,而现在主流使用的是64位系统,因此我们得安装32位库. 在ubunt ...
随机推荐
- tar打包和解压命令
如果你有一个大文件 想下载下来 但是又太大 可以压缩一下 然后打包 #压缩 tar -czvf ***.tar.gz tar -cjvf ***.tar.bz2 #解压缩 tar -xzvf ***. ...
- PAT 1080. Graduate Admission (30)
It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applicat ...
- PAT 1078. Hashing
The task of this problem is simple: insert a sequence of distinct positive integers into a hash tabl ...
- Linux无处不在
Linux is Everywhere从政府.教育.商业和非盈利组织.科研机构几个方面展示了现在都有哪些地方用了Linux.
- LCD深度剖析
LCD 深度剖析 来源:http://blog.csdn.net/hardy_2009/article/details/6922900 http://blog.csdn.net/jaylondon/a ...
- 系统的启动模式(启动级别)的改动---使用upstart启动机制的
/********************************************************************* * Author : Samson * Date ...
- 将PL/SQL代码封装在机灵的包中
将代码封装在机灵的包中 http://www.oracle.com/technetwork/issue-archive/2013/13-jan/o13plsql-1872456.html 绝大多数基于 ...
- mysql其他函数
mysql,,); +---------------+ ,,) | +---------------+ | +---------------+ row in set (0.22 sec) mysql) ...
- 3 Ways of JDK Source Code Attachment in Eclipse---reference
You wanna look at a JVM class while you are coding and you cannot. Here is the solution. First of al ...
- CentOS 更新yum源
公司买了一台刀片机服务器,安装的系统版本太低,导致yum源不合适,安装就会报错. 在网上找了好长时间,才发现是yum源的问题. 转载原文: 突然想起试试 Docker,在一台计算机上安装了 Cen ...