1.控制首页哪些分类不显示

{loop subcat(0,0,0,$siteid) $r}
{php if($r['catid']==17)break;}
{php $num++}
<div class="box cat-area" {if $num%2!=0}style=" margin-right:10px"{/if}>

2.避免首页分类显示重复

<div class="content">
{php $pic_id=0}  <!-- 图片文章id -->
{pc:content action="lists" cat}

 

<!-- 排除图片id -->

{php $cata_num=0} 
{loop $info $v}
{php if( $pic_id==$v[id] ) continue;}
{php $cata_num++}
{php if( $cata_num>4)break;}
<li>·<a href="{$v['url']}" target="_blank" title="{$v['title']}"{title_style($v[style])}>{str_cut($v['title'],60)}</a></li>
{/loop}

 

3.导航菜单

最终效果:

PHPCMS 模板修改

素材:

PHPCMS 模板修改

PHPCMS 模板修改

<div class="nav-bar">
  <map>
    <ul class="nav-site">
      <li><a href="http://cng.huiyv.com"><span>首页</span></a></li>
    </ul>
  </map>
</div>

.header .nav-bar {
  clear: both;
  height: 33px;
  overflow: hidden;
  padding-left: 3px;
  height: 40px;
  background: #2B7ACD url(../images/nav_bg.png) no-repeat 0 0;
}

.header .nav-site li {
  float: left;
  padding: 0 5px;
  height: 40px;
  ine-height: 40px;
  background: url(../images/nav_bg.png) no-repeat 100% 0px;
  font-weight: 700;
  font-size: 14px;
  margin-right: 1px;
}

.header .nav-site li a {
  float: left;
  padding: 0 18px;
  height: 40px;
  margin-right: 1px;
  color: #FFF;
}

 .nav-site li a:hover{background:url(../images/nv_a1.jpg) no-repeat 50% 0px;text-decoration:none;}

可能有些样式遗漏需要调整下  

相关文章: