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

The method of calling tag on the dedeCMS list page

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article will explain in detail the method of calling tag on the dedeCMS list 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 does the dedeCMS list page call tag?

Previous versions of dedeCMS5.6

Open the DEDECMS root directory include/common.func.php

Add the following code in front of the bottom? >:

Recommended study: dream weaving cms

The code is as follows:

$tsql = new DedeSql (false); $tags =''; $tsql- > SetQuery ("Select i.tag From dede_taglist t left join dede_tagindex I on i.id=t.tid where t. AIDEDADT"); $tsql- > Execute ('t'); while ($row = $tsql- > GetArray ('tweak MYSQLASSOC)) {$tags. = ". $row [' tag'].";} return $tags;}

two。 Then you can use the

{dede:field.id function= "listtag (@ me)" /}

To invoke the TAG tag

Can be used on the list page

[field:id function= "listtag (@ me)" /]

To call the TAG tag.

DedeCMS5.7

The dedecms v5.7 version can be called directly using the tag [field:id function=GetTags (@ me) /]. Only without a connection, if you need a connection, comment out the 130th line of the include\ helpers\ archive.helper.php file:

/ / $tags. = ($tags==''? $row ['tag']:','. $row ['tag'])

Replace with the following statement, of course, you can also add your own style

$tags. = "

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.

Share To

Servers

Wechat

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

12
Report