In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the Weaving Dream DEDECMS call article TAG tag and add the link method which has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
How does dream weaving DEDECMS call the article TAG tag and add a link?
Dream weaving DEDECMS calls the TAG tag of the article and adds a link.
1. For a list page, use the following code:
[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]
two。 For a content page, use the following code:
{dede: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; {/ dede:field.id}
Code interpretation
In fact, there are only three points of knowledge applied here:
1. Use the built-in GetTags function to get the TAG list corresponding to the document
two。 Split the obtained value into an array based on the comma (,) of the half-width symbol
3. Loop array elements, output and link their corresponding values
At the same time, for better compatibility, the program installation directory in the basic parameters of the system is also loaded with the global $cfg_cmspath; method, which is used to automatically be compatible with sites installed to subdirectories when attaching links.
Thank you for reading this article carefully. I hope the editor can share the article TAG tag of Weaving Dream DEDECMS and add the link method which is helpful to everyone. At the same time, I also hope that you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are 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.
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.