In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to call the tag tag on the dedecms list page and the details page. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
How do I call the tag tag on the dedecms list page and details page?
When using the dedecms system, if we want to write a function when calling the tags tag on the list page or details page, here's how to implement it:
Method 1, add php directly to the template
Here, take the default template as an example, open / templets/default/list_article.htm and find the following code:
The code is as follows:
High praise: [field:scores/]
Add the following code at the end:
The code is as follows:
Tag: [field:id runphp='yes'] global $cfg_cmspath; $tags = GetTags (@ me); $revalue =''; $tags = explode (',', $tags); foreach ($tags as $key = > $value) {if ($value) {$revalue. ='. $value.'';} @ me = $revalue; [/ field:id]
Just save it.
Method 2, we add the following actions to the template page, and the code is as follows:
The code is as follows:
{dede:field.aid function= "getmeurl (@ me)" /}
Then add the following code to the include/channelunit.func.php:
The code is as follows:
Function getarttag ($id) {$tags =''; $id= intval ($id); $dsql = new Dedesql (false); $sql = "select `tag` from dede_taglist where aid='$id'"; $dsql- > SetQuery ($sql); $dsql- > Execute ('hw'); while ($row=$dsql- > GetArray (' hw')) {if ($tags = ") {$tags = 'tag tag:'. $row ['tag'].';} else {$tags. =',. $row ['tag'].';} return $tags } about the dedecms list page and the details page to call the tag tag method to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
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.