Dede calls the Specified Document ID to call a specific document

Source: Internet
Author: User
1 {dede:arclist row=1 idlist=‘6‘}
2 <li><a href="[field:arcurl/]">[field:description/]</a></li>
3 {/dede:arclist}
1. Specify the Document ID to call a specific document: the code is as follows:
 
1 {dede:arclist idlist=‘373,387,277‘ titlelen=100}<a href=‘[field:arcurl/]‘>[field:title/]</a>{/dede:arclist}
All users only need to add idlist = '20160301' to arclist to call the document whose ID number is 373,387,277. 2. Specify keyword to call a specific document: {Dede: arclist keyword = ' 'titlelen = 100} <a href =' [field: arcurl/] '> [field: title/] </a> {/Dede: arclist} All users only need to add keyword =' 网' to arclist, which indicates the document that calls keyword and sets it as. Similarly, idlist and keyword values can have multiple values. To set multiple values, you only need to separate them with commas (,) in English. The Code is as follows:
1 {dede:global runphp="yes"}
2 global $dsql;
3 $row=$dsql->getOne("select title from dede_archives where id=xxx");
4 @me=$row["title"];
5 {/dede:global}
The code for getting the article content is as follows:
1 {dede:global runphp="yes"}
2 global $dsql;
3 $row=$dsql->getOne("select body from dede_addonarticle where aid=xxx");
4 @me=$row["body"];
5 {/dede:global}

Dede calls the Specified Document ID to call a specific document

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.