Dede tag tag, dede keyword call

Source: Internet
Author: User
Tags tagname

Dede the various methods of tag invocation

Dede tag the most common method of calling method of the latest tag tag call{dede:tag row= ' 30′sort= ' new '} [field:highlight/] ([field:result/]) {/dede:tag} the method of the month popular tag tag call{dede:tag row= ' 30′getall= ' 1′sort= ' Month '} [field:tagname/] ([field:result/]) {/dede:tag} method of random tag tag call{dede:tag row= ' 60′sort= ' Rand '} [field:highlight/] ([field:result/]) {/dede:tag} content Page Tag Add method of Tag call{dede:tag type= ' current '/} Let's take a look at the Official document # #标签名称: tag# #功能说明: Tag call tag # #适用范围: Global Use # #基本语法: ##{dede:tag sort= ' new ' getall= ' 0′} ##<a href= ' [field:link/] ' >[field:tag/]</a>##{/dede:tag}# #参数说明: # #row = ' 30′ number of calls # #sort = ' new ' sorted by month, rand,week# #getall = ' 0′ gets type 0 for the current content page tag tag, 1 for Get all tag tags # #底层模板字段: # #link, Tag —————————————————————— – Dede using the Tag keyword tag in the list but we know that Dede default in the list is not able to call the tag tag, is the whole or the current page? Obviously all the words and the classification of information and a little random, if you use the current page, there is no article ID, you can not make things. Is that all right? dedeCMS5.6 method of calling tag on List page-dedecms  Method One [field:id runphp=yes] $tsql = new Dedesql (false); $tags = "; $tsql->setquery (" Select I.tag from Dede_taglist t l EFT Join Dede_tagindex i on I.id=t.tid where t.aid= ' @me ' "), $tsql->execute (' t ') and while ($row = $tsql->getarray (' t ', MYSQL_ASSOC) {$tags. = "<a href= '/tag.php?/". UrlEncode ($row [' tag ']). "' > ". $row [' tag ']." </a> ";} @me = $tags; [/field:id]  method 21. Open the Dedecms root directory include/common.func.php Add the following code to the bottom?>://ni9ht: List page Call tag method function Listtag ( $aid) {$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.aid= ' $aid ' "), $tsql->execute (' t ') and while ($row = $tsql->getarray (' t ', Mysql_assoc)) {$tags. = "<a href= '/tags.php?/". UrlEncode ($row [' tag ']). " /' > '. $row [' tag ']. " </a> ";} return $tags;} {dede:field.id Runphp=yes} $tsql = new Dedesql (false); $tags = "; $tsql->setquery (" Select I.tag from Dede_taglist T left J Oin dede_tagindex i on I.id=t.tid where t.aid= ' @me ' "); $tsql->execute ('T '), while ($row = $tsql->getarray (' t ', Mysql_assoc)) {$tags. = "<a href= '/tag.php?/". UrlEncode ($row [' tag ']). "' > ". $row [' tag ']." </a> ";} @me = $tags; {/dede:field.id} 2. Then on the article page you can use {dede:field.id function= "Listtag (@me)"/} to invoke the tag tag, and on the list page you can use [Field:id function= "Listtag (@me)"/] To invoke the tag tag. Then add the [Field:id function= Listtag (@me) "/] marker to the list page location. 5.6 version of the dedecms inside about the tag call, although there are typeid parameters, but you open the database to see that, although the Dede_tagindex table also has a typeid field. This allows us to implement a more flexible tag invocation with Dede SQL statements. ——————————————————————- Your ad has expired code adjustments and if you continue running please contact your administrator{dede:tagname runphp= ' yes '} $time 1 = @me; @me = time ();//$time 2 = "[Field:pubdate function= ' Getdatetimemk (@me) '/]";//$ Time3 = "[Field:jzdata function= ' Getdatetimemk (@me) '/]"; $time 2 = Getdatetimemk (@me); $time 3 = Getdatetimemk (@me); if (@ Me>strtotime ($time 2) and @me <strtotime ($time 3)) {@me = "<meta http-equiv= ' Refresh ' content= ' 0; url=[field:khurl/] '/> ';} else {@me = "The ad has expired and if it continues to run please contact the administrator";} {/dede:tagname} There are many ways to implement tag pseudo-static, it seems that the simplest is the following methods:1, Dede background turn on pseudo-static 2, find the file/include/taglib/tag.lib.php search the following code: $row [' link '] = $cfg _cmsurl. " /tags.php?/". UrlEncode ($row [' keyword '])." /"Change to $row[' link ') = $cfg _cmsurl." /tags/". UrlEncode ($row [' keyword ']).". HTML "; 3, find the template file templets/default/taglist.htm search the following code: (Note: Some versions do not have this step can be omitted) <strong> Current location: </strong>:<a href= "{dede:global.cfg_cmsurl/}/" > Home </a> > <a href= ' tags.php ' >tag tags </a> > {dede:field.title/} Modify to <strong> current position: </strong>:<a href= "{dede:global.cfg_cmsurl/}/" > Home </a> > <a href= '/ Tags.html ' >tag tags </a> > {dede:field.title/}4, Httpd.ini file riga: Rewriterule ^ (. *)/tags.html $1/ Tags.phprewriterule ^ (. *)/tags/(. *). HTML $1/tags.php?$2

Dede tag tag, dede keyword call

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.