{ /dede:arclist}" can be used."/> { /dede:arclist}" can be used.">
Home > Article > CMS Tutorial > How does DEDE call the specified article ID to call a specific document?
How does DEDE call the specified article ID to call a specific document?
Specify the article id to call a specific document in It is quite practical in some cases. There is an example below. Friends who need it can learn about it.
Recommended learning: 梦Weavercms
The code is as follows:
{dede:arclist row=1 idlist='6'} <li><a href="[field:arcurl/]">[field:description/]</a></li> {/dede:arclist}
1. Specify the id of the article to call a specific document:
The code is as follows:
{dede:arclist idlist='373,387,277' titlelen=100}<a href='[field:arcurl/]'>[field:title/]</a>{/dede:arclist}
All you need to do is add idlist='373,387,277' to arclist. Indicates calling the document with ID number 373,387,277.
2. Specify the keyword to call a specific document:
{dede:arclist keyword='建站教程网' titlelen=100}<a href='[field:arcurl/]'>[field:title/]</a>{/dede:arclist}
All you need to do is add keyword='website building tutorial network' to the arclist, which means calling the document with the keyword set to the website building tutorial network. Similarly, the values of idlist and keyword can have multiple values. When multiple values need to be set, they only need to be separated by commas "," in English.
The code is as follows:
{dede:global runphp="yes"} global $dsql; $row=$dsql->getOne("select title from dede_archives where id=xxx"); @me=$row["title"]; {/dede:global}
Get the content of the article
The code is as follows:
{dede:global runphp="yes"} global $dsql; $row=$dsql->getOne("select body from dede_addonarticle where aid=xxx"); @me=$row["body"]; {/dede:global}
The above is the detailed content of How does DEDE call the specified article ID to call a specific document?. For more information, please follow other related articles on the PHP Chinese website!