Dedecms to invoke a specific ID article content implementation method

Source: Internet
Author: User

Dedecms to invoke a specific ID article content implementation method


Code Explanation:
{dede:loop table= ' dede_addonarticle ' sort= ' aid ' row= ' 8 ' if= ' aid=524 '}
One of the aid=524 represents an article with an ID number of 524 for the list of articles,
Table= ' dede_addonarticle ' as the table of the saved article
The middle of the line is the most important,
[Field:body function= "Html2text (cn_substr (' @me ', 200))"/]
There are several ways to invoke this sentence:
such as: [field:body/] will get all the content of the article, do not filter HTML tags
[Field:body function= "(Cn_substr (' @me ', 200))"/]
Only the first 200 characters of the content are taken
[Field:body function= "Html2text (cn_substr (' @me ', 200))"/]
Take the first 200 characters and filter the HTML tags
In fact, Dedecms is really strong, I have been tasted.

Dedecms to invoke a specific ID article content implementation method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.