In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 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: 255
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.