首页 > CMS建站 > PhpCMS > 正文

phpcms2008 隐藏首页部分栏目的方法

2020-10-10 21:04:00
字体:
来源:转载
供稿:网友

路径1:后台登录->模板风格->管理模板->网站首页

路径2:直接访问网站首页模板地址:./templates/模板风格文件夹名/phpcms/index.html

在index.html以下代码段添加红色所示的代码:

  1. <!--{loop $subcats $catid $cat}-->说明:产生首页各栏目的代码段 
  2. <!--{if $cat[catid] != 14 and $cat[catid] != 17 and $cat[catid] != 20 and $cat[catid] != 23}-->说明:隐藏catid等于14、17、20、23的栏目 
  3.  
  4.     <div class="cat_index"
  5.       <div class="cat_title"><a href="{$cat[url]}"><img src="images/more.gif" alt="更多" /></a> 
  6.         <h3>{$cat[catname]}</h3> 
  7.       </div> 
  8.       <div class="cat_left"
  9.         <ul class="pic_list"
  10.           {tag_首页图片循环标签} 
  11.         </ul> 
  12.       </div> 
  13.       <div class="cat_right"
  14.         <ul class="text_list"
  15.           {tag_网站首页内容标签} 
  16.         </ul> //Cuoxin.com 
  17.       </div> 
  18.     </div> 
  19. <!--{/if}--> 
  20. <!--{/loop}-->

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表