Get the App
SLTechnology News&Howtos  ›  Servers  › 

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

Shulou Source: shulou.com Published: 2022-06-02 05:00:24 09月28日 Update

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!

Tags: Articles tags links articles methods questions learning next code value content at the same time quotes files friends templates directories ribbons websites industries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Apple macOS Linux Shulou Information