模板组件:nav_pc.tpl nav_m.tpl 导航共用文件

由于考虑到模板的自适应功能,菜单表现的方式可能不一样,故将菜单分为了nav_pc.tpl(PC端)nav_m.tpl(移动端),仅供参考,下面为默认模板的HTML代码
<nav class="navbar navbar-inverse visible-lg visible-md" role="navigation" data-dir="#nav-{$list_dir}">
<div class="container">
<ul class="nav navbar-nav navbar-left">
<volist name=":ff_mysql_nav('field:*;limit:120;cache_name:default;cache_time:default;order:nav_pid asc,nav_oid;sort:asc')" id="feifei">
<notempty name="feifei.nav_son">
<li class="dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">{$feifei.nav_title}<b class="caret"></b></a>
<ul class="dropdown-menu">
<volist name="feifei.nav_son" id="feifeison">
<eq name="feifeison.nav_target" value="1">
<li><a href="{$feifeison.nav_link}" target="_blank">{$feifeison.nav_title}</a></li>
<else/>
<li><a href="{$feifeison.nav_link}">{$feifeison.nav_title}</a></li>
</eq>
</volist>
</ul>
</li>
<else/>
<eq name="feifei.nav_target" value="1">
<li id="nav-{$feifei.nav_tips}"><a href="{$feifei.nav_link}" target="_blank">{$feifei.nav_title}</a></li>
<else/>
<li id="nav-{$feifei.nav_tips}"><a href="{$feifei.nav_link}">{$feifei.nav_title}</a></li>
</eq>
</notempty>
</volist>
</ul>
<p class="navbar-text navbar-right" id="ff-user" data-href="{:ff_url('user/center')}">
<gt name="user_id" value="0">
<span class="glyphicon glyphicon-user ff-text"></span>
<a href="{:ff_url('user/center')}" class="ff-text">{$user_name|msubstr=0,6,true}</a>
<else/>
<a href="{:ff_url('user/login')}" class="ff-text">登录</a>
<a href="{:ff_url('user/register')}" class="ff-text">注册</a>
</gt>
</p>
<p class="navbar-text navbar-right">
<include file="Block:vod_record_get" />
</p>
<neq name="action" value="index">
<form class="navbar-form navbar-right ff-search" id="ff-search" role="search" action="{$root}index.php?s=vod-search-name" method="post">
<div class="form-group">
<input type="text" class="form-control" id="ff-wd" name="wd" placeholder="Search">
</div>
<button type="submit" class="btn btn-default" data-module="vod" data-action="{:ff_url('vod/search',array('name'=>'FFWD'), true)}">搜索</button>
</form>
</neq>
</div><!-- /.container -->
</nav><!-- /.navbar -->
调用代码
<include file="Block:nav_pc" />
<include file="Block:nav_m" />

0 个评论

要回复文章请先登录注册