{ /dede:arclist}" can be used."/> { /dede:arclist}" can be used.">
search
HomeCMS TutorialDEDECMSHow 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?

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=&#39;373,387,277&#39; titlelen=100}<a href=&#39;[field:arcurl/]&#39;>[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=&#39;建站教程网&#39; titlelen=100}<a href=&#39;[field:arcurl/]&#39;>[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!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)