Home > CMS Tutorial > DEDECMS > body text

How to intercept strings in dedecms arclist

藏色散人
Release: 2019-12-11 10:45:59
Original
1941 people have browsed it

How to intercept strings in dedecms arclist

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:

{dede:arclist typeid=’9′ titlelen=’40′ orderby=” limit=’0,5′}
<li><a href=”#” target=”_blank”>[field:title /]</a></li>
{/dede:arclist}
Copy after login

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:

{dede:arclist typeid=’9′ titlelen=’40′ orderby=” limit=’0,5′}
<li><a href=”#” target=”_blank”>[field:title function="cn_substr(@me,10)"/]</a></li>
{/dede:arclist}
Copy after login

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!

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!