search
HomeCMS TutorialDEDECMSHow to call the Q&A column article to the home page of DreamWeaver

How to call the Q&A column article to the home page of DreamWeaver

How to call the Q&A column article to the homepage?

How to implement DEDECMS calling the Q&A column article to the home page

There are quite a lot of webmasters using the DEDECMS Q&A module, and the DEDECMS Q&A system scores high Bounty issues, issues to be solved, newly solved issues, recommended issues, etc. need to be called in the website. For example, when calling to the homepage, you can call it through the following code

Recommended learning: dedecms tutorial

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}

Parameter description:

row='6' Number of calls

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

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

titlelen='24' Title length

Underlying template fields:

tid,tidname,title,url,typeurl

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

1. Calls for issues 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}

2. New problem solving call

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}

3. Recommended problem 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}

4. High bounty issue call

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}

The above is the detailed content of How to call the Q&A column article to the home page of DreamWeaver. 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

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.