How to intercept strings in dedecms arclist?
This article mainly introduces two methods of intercepting strings in dedecms arclist, one is the common titlelen parameter method, and the other is the cn_substr function method. Friends in need can refer to it
Recommended learning: Dreamweaver cms
Method 1:
The code is as follows:
1 2 3 |
|
Instructions: arclist, the detailed parameter description is in There are detailed instructions in the background template, please refer to the introduction there for details. Among them: titlelen, the number of strings can be intercepted, which means outputting 20 Chinese characters
Method 2:
The code is as follows:
1 2 3 |
|
Instructions: [field: title function="cn_substr(@me,10)"/], which means: intercept the first 10 characters of the field title, that is, 5 Chinese characters
The above is the detailed content of How to intercept strings in dedecms arclist. For more information, please follow other related articles on the PHP Chinese website!