Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the arclist tag of cms

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor will share with you the relevant knowledge points about how to use cms's arclist tag, the content is detailed, and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

Tag name: arclist

Introduction to tags: common tags for dream weaving, also known as free list tags, in which imglist, imginfolist, specart, coolart, and autolist are alias tags extended by the different attributes defined by the tag. [recommended study: dedecms video tutorial]

Function description: get the list of specified documents

Scope of application: global use

Basic syntax:

{dede:arclistflag='h'typeid=''row=''col=''titlelen=''infolen=''imgwidth=''imgheight=''listtype=''orderby=''keyword=''limit='0,1'}

[field:title/]

{/ dede:arclist}

Parameter description:

How many columns are displayed in col='' (single column by default). In version 5.3, this attribute can be displayed in multiple rows in many ways.

If col='1' needs multi-column display, it can be implemented with div+css.

The following is an example of implementing multiple columns through div+css:

Div {width:400px;float:left;}

{dede:arclistrow='10'titlelen='24'orderby='pubdate'idlist=''col='2'}

? [field:textlink/] ([field:pubdatefunction=MyDate ('mmurdongdongjie me) /])

{/ dede:arclist}

When col > 1 will be displayed using the original table multi-column mode

Row='10' returns the total number of documents listed

Typeid='' column ID, which generally does not need to be specified in list template and file template, is allowed to use "," to represent multiple columns separately in the home template.

If getall='1' does not specify this attribute, the subclasses of multiple columns separated by "," will not be obtained in the column page and article page template.

The length of titlelen='30' title is equal to titlelength.

Infolen='160' indicates that the length of the content introduction is equal to that of infolength

Imgwidth='120' thumbnail width

Imgheight='90' thumbnail height

Listtype='all' column type image contains thumbnail commend recommendation

Orderby='sortrank' document sorting method

§orderby='hot' or orderby='click' means to arrange by number of clicks

§orderby='sortrank' or orderby='pubdate' by publication time

§orderby='near'

§orderby=='lastpost' by last comment time

§orderby=='scores' sorts by score

§orderby='id' is sorted by article ID

§orderby='rand' randomly gets a list of documents for specified conditions

Keyword='' contains a list of documents with specified keywords, with multiple keywords divided by ","

Innertext='' single record style

Aid='' specifies the document ID

Idlist='' extracts specific documents (document ID)

Channelid Channel ID

Limit=' starts ID, and the number of records'(starting ID starts from 0) indicates the limited range of records (for example, limit='1,2' means 2 records are taken from records with ID of 1)

Flag='h' custom attribute value: headline [h] recommended [c] picture [p] slide [f] scroll [s] jump [j] picture text [a] bold [b]

Noflag='' is the same as flag, but here it means that these attributes are not included

The orderway='desc' value is desc or asc, which specifies whether the sorting method is descending or forward. The default is descending.

Subday=' days' indicates the number of days within which the document is in.

Call the method on the additional table field with arclist:

To get the contents of an additional table, two conditions must be met

1. Specify the channelid attribute

2. Specify the field to be obtained, addfields=' field 1, field'

Such as:

{dede:arclistaddfields='filetype,language,softtype'row='8'channelid='3'}

[field:textlink/]-[field:softtype/]

{/ dede:arclist}

Underlying template field:

ID (same as id), typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer

Source,litpic (same as picname), pubdate,senddate,mid,lastpost,scores,goodpost,badpost,notpost

Description (same as infos), filename,image,imglink,fulltitle,textlink,typelink,plusurl,memberurl,templeturl

Stime (pubdate's "0000-00-00" format)

Where:

Textlink=title

Typelink=typename

Imglink=

Image=

Field call method: [field:varname/]

Such as:

{dede:arclistinfolen='100'}

[field:textlink/]

[field:infos/]

{/ dede:arclist}

Note: the Field implementation in the underlying template is also a form of dream tagging, so it supports the use of PHP syntax, Function extensions and other functions.

For example, add (new) logo to the content posted on the same day.

[field:senddaterunphp='yes']

$ntime=time ()

$oneday=3600*24

If ($ntime-@me)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report