Home > php教程 > php手册 > 帝国CMS listshowclass循环栏目标签

帝国CMS listshowclass循环栏目标签

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 09:38:31
Original
1649 people have browsed it

循环栏目导航标签基本语法:[listshowclass]父栏目ID,标签模板ID,是否显示栏目信息数,显示栏目数[/listshowclass]

参数说明:

  • 父栏目ID:'0'为显示所有一级栏目,'selfinfo'显示本栏目下级栏目,多栏目固定调用可用","格开。
  • 标签模板ID:标签模板ID,模板标签变量说明:[!--bclassname--]:父栏目名,[!--bclassurl--]:父栏目链接,[!--bclassid--]:父栏目id,[!--bclassimg--]:父栏目图片,[!--bintro--]:父栏目简介,[!--bnum--]:父栏目信息数,[!--bno--]:父栏目序号。list.var模板标签: [!--classurl--]:栏目链接,[!--classname--]:栏目名称,[!--classid--]:栏目id,[!--classimg--]:栏目图片,[!--intro--]:栏目简介,[!--num--]:信息数,[!--no--]:序号。
  • 是否显示栏目信息数:0为不显示,1为显示。
  • 显示栏目数:0为不限制。

举个例子,调用标签为如下:[listshowclass]'0',14,0,0[/listshowclass]

说明:调用所有一级栏目导航,使用标签模板ID=14的模板。

标签模板制作为如下:

// 页面模板内容
<table width="120" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="ffcc00">
  <tr> 
    <td><b><a href="[!--bclassurl--]">[!--bclassname--]</a></b></td>
  </tr>
[!--empirenews.listtemp--]
<!--list.var1-->
[!--empirenews.listtemp--]
</table>
// 列表内容模板(list.var)
  <tr> 
    <td bgcolor="#FFFFFF"><a href="[!--classurl--]">[!--classname--]</a></td>
  </tr>
Copy after login

用循环栏目导航标签

// 页面模板内容
<table width="650" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="ffcc00">
  <tr> 
    <td><b><a href="[!--bclassurl--]">[!--bclassname--]</a> <font color="#666666">(信息数:[!--bnum--])</font></b></td>
  </tr>
  <tr> 
    <td bgcolor="#ffffff">
[!--empirenews.listtemp--]
<!--list.var1-->
[!--empirenews.listtemp--]
    </td>
  </tr>
</table>
// 列表内容模板(list.var)
<a href="[!--classurl--]">[!--classname--]</a> <font color="#666666">(信息数:[!--num--])</font>   
Copy after login

showclasstemp 与 listshowclass 两个标签的异同

一个调用一个级别的栏目,另一个是调用两个级别的栏目。

showclasstemp调用效果:

栏目1
栏目2
栏目3
Copy after login

listshowclass调用效果:

父栏目1
  子栏目1
  子栏目2
父栏目2
  子栏目3
  子栏目4
父栏目3
  子栏目5
  子栏目6
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template