Home > CMS Tutorial > DEDECMS > body text

How to randomly recommend articles on dedecms article page

藏色散人
Release: 2019-12-03 09:49:32
Original
3989 people have browsed it

How to randomly recommend articles on dedecms article page

How to randomly recommend articles on the dedecms article page?

dedecms article page randomly recommends articles

The content page of the DEDECMS website needs to add random articles. What calling tag should be used for this?

Random recommendation tags on the DEDE template article content page

This problem can be solved by using a template tag.

{dede:arclist row='1000' pagesize='10' titlelen='35' orderby='rand'}
<li><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
Copy after login

Recommended study: 梦Weavercms

The articles recommended on the article content page are often the latest, most popular, etc. But there are still many unpopular old articles that are hiding in the corner, so we need to display these contents through random recommendations.

The meaning of the above tag is that row='1000' means taking out 1000 articles, orderby='rand' means randomly sorting these articles,

pagesize='10' means only displaying random ones. Top ten articles sorted.

After this processing, when generating the article html, the retrieved articles will be randomly sorted and the top ten will be displayed. This can ensure that the recommended content of all articles

is randomly distributed.

This tag of randomly calling articles is very useful for us to build websites, especially for information websites and other article websites. Collect it!

The above is the detailed content of How to randomly recommend articles on dedecms article page. 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