Recently, I helped a friend manage a travel website - Beihai Nanzhu Holidays. This website was built using the dedecms program. The structure is relatively simple, but there is still quite a lot of content. Although I am no stranger to dedecms, I have not been exposed to it for several years. I was suddenly asked to revise it, and I was really at a loss for the moment. The program version of the website is DedeCmsV5.5_GBK. I checked on the dedecms official website and found that the latest version is DedeCmsV5.7, but the template tag syntax has basically not changed much. I want to read the help manual, but I can't open it! Helpless, then I can only slowly debug and accumulate.
The following is a template tag fragment for sorting travel information by hot spots. The syntax is "orderby='click'", which means the ones with the most clicks are ranked first.
<ul> {dede:arclist titlelen=28 channelid='24' typeid='94' row='10' orderby='click'} <li><a href="[field:arcurl/]" title="[field:fulltitle/]">[field:fulltitle function='substr(@me,0,34)'/]</a></li> {/dede:arclist} </ul>
The template tag function above is to list 10 articles sorted by their click-through rate. Here is a brief introduction to other tag syntax:
{dede:arclist} {/dede:arclist}: The opening and closing tags of the article list
titlelen=28:
Control the number of displayed words in the article title
channelid='24' : Channel ID is 24
typeid='94': Column ID is 94
row='10': List 10 articles
[field:arcurl/]:Article hyperlink
[field:fulltitle/] : Article title
[field:fulltitle function='substr(@me,0,34)'/]: The length of the intercepted article title is 34 bytes, which is 17 words.