Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Dedecms article page calls the Tag tag of the current article and adds a tag hyperlink

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the dedecms article page to call the current article Tag tag and add tag hyperlink method, 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 the dedecms article page call the current article Tag tag and add a tag hyperlink?

The dedecms article page calls the current article Tag tag and adds a tag hyperlink

Recommended study: dream weaving cms

After reading a lot of articles, it seems that there is something wrong with their quotation marks. I reorganized and sent them out:

1. Current article Tag tag

Dream dedecms article page call Tag tag is relatively simple, find the article template to add {dede:field.tags/} this tag. But the default Tag tag for Weaving Dream dedecms is unlinked, so move on to the second step.

2. Add a hyperlink to the Tag tag

Find the website and / include/helpers/archive.helper.php under the directory and find about 120 lines.

If (! Function_exists ('GetTags')) {function GetTags ($aid) {global $dsql; $tags=''; $query = "SELECT tag FROM `dede_ taglist` WHERE aid='$aid'"; $dsql- > Execute ('tag',$query); while ($row = $dsql- > GetArray (' tag')) {$tags. = ($tags==''? $row ['tag']:','. $row ['tag']) } return $tags;}}

Replace with the following code:

If (! Function_exists ('GetTags')) {function GetTags ($aid) {global $dsql; $tags =''; $query = "SELECT tag FROM `dede_ taglist` WHERE aid='$aid'"; $dsql- > Execute ('tag',$query) While ($row = $dsql- > GetArray ('tag')) {$tags. = ($tags==''?''. $row ['tag'].':','.'. $row ['tag'].');} return $tags;}}

Or download the file directly to replace it.

Thank you for carefully reading this article, I hope the editor to share the dedecms article page to call the current article Tag tag and add tag hyperlink method content to help everyone, but also hope that you support a lot, pay attention to the industry information channel, find problems, detailed solutions 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: 212

*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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report