In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how the dedecms Dream Weaving TAG tag shows how many articles a single tag has, which can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
How does the dedecms Dream Weaving TAG tag show how many articles there are in a single tag?
When we design the dream weaving dedecms template, we want to achieve the link and tag name of the tag, while also showing the number of articles associated with each tag.
However, Weaving Dream does not have such a tag to call by default, so we need to modify the system files to achieve it. The specific methods are as follows:
Find and open the / include/taglib/tag.lib.php file and find the following code at line 87 or so:
$row ['link'] = $cfg_cmsurl. "/ tags.php?/" .urlencode ($row [' keyword']). "/"
Add the following code at the bottom of this line:
$count = $dsql- > GetOne ("Select count (tid) From `dede_ taglist`where tag ='". $row ['tag']. "'"); $row ['count'] = $count [' count (tid)']
After you add it, you can use [field:count/] to obtain the number of articles associated with the current tag tag in the tag loop tag of the template. The complete example is as follows:
{dede:tag sort='hot' getall='2'} [field:tag /] {/ dede:tag} Thank you for reading this article carefully. I hope the editor can share the dedecms Dream Weaving TAG tag how to show how many articles in a single tag are helpful to everyone. At the same time, I also hope you can support us, pay attention to the industry information channel, find the problem, and the detailed solution is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.