search
Homephp教程php手册帝国CMS listshowclass循环栏目标签

循环栏目导航标签基本语法:[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>

用循环栏目导航标签

// 页面模板内容
<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>   

showclasstemp 与 listshowclass 两个标签的异同

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

showclasstemp调用效果:

栏目1
栏目2
栏目3

listshowclass调用效果:

父栏目1
  子栏目1
  子栏目2
父栏目2
  子栏目3
  子栏目4
父栏目3
  子栏目5
  子栏目6
Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools