{ /dede:arclist}" can be used."> How does DEDE call the specified article ID to call a specific document?-DEDECMS-php.cn
Home> CMS Tutorial> DEDECMS> body text

How does DEDE call the specified article ID to call a specific document?

藏色散人
Release: 2019-12-18 10:33:28
Original
1743 people have browsed it

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'} 
  • [field:description/]
  • {/dede:arclist}
    Copy after login

    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}[field:title/]{/dede:arclist}
    Copy after login

    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}[field:title/]{/dede:arclist}
    Copy after login

    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}
    Copy after login

    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}
    Copy after login

    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!

    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
    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!