Home > CMS Tutorial > DEDECMS > How does Dreamweaver CMS call the Q&A column articles to the homepage?

How does Dreamweaver CMS call the Q&A column articles to the homepage?

青灯夜游
Release: 2019-11-19 14:06:39
Original
2346 people have browsed it

How does Dreamweaver CMS call the Q&A column articles to the homepage?

How to use Dreamweaver CMS to call the Q&A column article to the homepage:

Site using Dreamweaver DEDECMS Q&A module It is quite long. The high-scoring bounty questions of the DreamWeaver Q&A system, unsolved questions, newly solved questions, recommended questions, etc. need to be called in the website. For example, to call the homepage, you can call it through the following code:

Basic syntax description:

The code is as follows:

{dede:ask row='6' qtype='new' tid='0' titlelen='24'}  
<dd>  
<span>[<a href=&#39;[field:typeurl/]&#39;>[field:tidname/]</a>]</span>  
<span><a href="[field:url/]">[field:title/]</a></span>  
</dd>  
{/dede:ask}
Copy after login

Parameter description:

row='6' Call bar Number

qtype='new' Sorting type command recommended, ok means solved problem, high high score question, new latest question

tid= '0' Column id, the default is all

titlelen='24' Title length

Underlying template field:

tid,tidname,title,url,typeurl
Copy after login

The internal calls of the Dreamweaver Q&A page are as follows:

1. Calls for problems to be solved

The code is as follows:

{dede:ask row=&#39;8&#39; titlelen=&#39;40&#39; sort=&#39;notok&#39;}  
<dd> <span>[{dede:field.typedata /}]</span> <span><a href="
question.php?id={dede:field.id /}">{dede:field.title /}</a></span> </dd>  
{/dede:ask}
Copy after login

2. Calls for new problems solved

The code is as follows:

{dede:ask row=&#39;8&#39; titlelen=&#39;40&#39; sort=&#39;ok&#39;}  
<dd> <span>[{dede:field.typedata /}]</span> <span><a href="
question.php?id={dede:field.id /}">{dede:field.title /}</a></span> </dd>  
{/dede:ask}
Copy after login

3. Recommended question calling

The code is as follows:

{dede:ask row=&#39;8&#39; titlelen=&#39;40&#39; sort=&#39;expiredtime&#39;}  
<dd> <span>[{dede:field.typedata /}]</span> <span><a href="
question.php?id={dede:field.id /}">{dede:field.title /}</a></span> </dd>  
{/dede:ask}
Copy after login

4. High bounty question calling

The code is as follows:

{dede:ask row=&#39;8&#39; titlelen=&#39;40&#39; sort=&#39;reward&#39;}  
<dd> <span>[{dede:field.typedata /}]</span> <span><a href="
question.php?id={dede:field.id /}">{dede:field.title /}</a></span> </dd>  
{/dede:ask}
Copy after login

Recommended learning: dedecms tutorial

The above is the detailed content of How does Dreamweaver CMS call the Q&A column articles to the homepage?. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template