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

The usage of arclist tag in Weaving Dream cms

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article is about the use of arclist tags in Dream Weaving cms. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

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.

Function description: get the list of specified documents

Scope of application: global use

Basic syntax:

{dede:arclist flag='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:arclist row='10' titlelen='24' orderby='pubdate' idlist='' col='2'}? [field:textlink/] ([field:pubdate function=MyDate]) {/ dede:arclist}

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

Row='10' returns the total number of document lists, typeid='' column ID, which is generally not specified in list templates and archive templates. "," is allowed to represent multiple columns separately in the home template. If getall='1' does not specify this property, in the column page and article page template, it will not get the "the subclass titlelen = '30' title length of separate columns equals to titlelengthinfolen='160' indicates that the length of content introduction is equal to infolengthimgwidth='120' thumbnail width imgheight='90' thumbnail height listtype='all' column type image contains thumbnails commend recommended orderby='sortrank' document sorting method §orderby='hot' or orderby='click' indicates that it is arranged by number of clicks Orderby='pubdate' by publication time §orderby='near' §orderby=='lastpost' by last comment time §orderby=='scores' sort by score §orderby='id' sort by article ID §orderby='rand' randomly get a list of documents with specified conditions keyword='' a list of documents with specified keywords Multiple keywords are divided into innertext =''single record style aid='' specifies document IDidlist =''to extract a specific document (document ID) channelid channel IDlimit=' starting ID, and the number of records'(starting ID starts from 0) indicates a limited record range (for example: limit='1,2' means starting from a record with an ID of 1 Take 2 records) flag ='h' custom attribute value: headline [h] recommend [c] picture [p] slide [f] scroll [s] jump [j] picture and text [a] bold [b] noflag = 'same as flag, but here it means that the orderway='desc' value does not include these attributes is desc or asc, specify whether to sort in descending or descending order, and the default is descending subday=' days to indicate the number of days within which the document

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:arclist addfields='filetype,language,softtype' row='8' channelid='3'} [field:textlink /]-[field:softtype /] {/ dede:arclist}

Underlying template field:

ID (with id), typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic (with picname), pubdate,senddate,mid, lastpost,scores,goodpost,badpost,notpost,description (with infos), filename, image, imglink, fulltitle, textlink, typelink,plusurl, memberurl, templeturl,stime (pubdate's "0000-00-00" format)

Where:

Textlink = titletypelink = typenameimglink =

Image =

titile

Field call method: [field:varname/]

Such as:

{dede:arclist infolen='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:senddate runphp='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

Servers

Wechat

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

12
Report