Dedehtml.com

织梦tag标签当前列表地址(动静态)

摘要:动静态下2种tag标签列表页当前url获取,方便跳转到手机站的tag列表页

动态

{dede:field.title runphp=yes}global $cfg_cmsurl;@me = $cfg_cmsurl."/tags.php?/".urlencode(@me)."/";{/dede:field.title}

静态(生成拼音形式)

{dede:field.title runphp=yes}global $dsql,$cfg_cmsurl;$tag = @me;$arcRow = $dsql->GetOne("Select * From `#@__tagindex` where tag like '$tag' ");$pinyin_title = GetPinyin(stripslashes($arcRow["tag"]));$pinyin_title = str_replace("?","",$pinyin_title);$pinyin_title = str_replace(":","",$pinyin_title);@me = $cfg_cmsurl."/tag/".$pinyin_title."_".$arcRow["id"]."_1.html";{/dede:field.title}
版权声明:本文为博主原创文章,未经博主允许不得转载。https://www.dedehtml.com/notes/dede-tag-currenturl.html
(7)
打赏 微信扫一扫 微信 支付宝 QQ 扫码打赏