In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you about the dedecms system list page to call the tag tag with a link at the same time, I hope you will learn a lot after reading this article, let's discuss it!
How does the dedecms system list page call the tag tag with a link?
Dream weaving DedeCMS system list page calls the TAG tag with a link, presumably many webmaster friends want to achieve it, and then will introduce the implementation method and code explanation in detail, interested you can not miss ha, hope to help you
Recommended study: dream weaving cms
Realization method
Here, take the default template as an example, open / templets/default/list_article.htm to find:
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.
Note: here I am taking the default template as an example, it is correct to open your own template and add code in the appropriate location.
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 in the additional chain.
Then automatically compatible with the site installed to the subdirectory.
Well, that's what it's all about, and that's what it explains. I hope those who can understand it can get inspiration from it, so as to draw lessons from others. Also look forward to sharing your tutorials. For no
If you understand it, it doesn't matter. You can collect this code and experience it later.
After reading this article, I believe you have a certain understanding of the method of calling the tag tag on the list page of the dedecms system and putting a link at the same time. Want to know more about it. Welcome to follow the industry information channel. Thank you for reading!
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.