乖兔博客

乖兔 > CMS系统 > 织梦cms tag标签页面当用当前列表页面的url

织梦cms tag标签页面当用当前列表页面的url

乖兔 更新于: 2021-04-20 分类:CMS系统

织梦cms tag标签页面当用当前列表页面的url.jpg

在前台页面输出当前页面的url可以做一些url规范化等用途,织梦cms标签tag页面默认没有对应的标签可以直接获取。需要特殊调用。

动态页面调用方法:

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

tag生成静态页面,url为拼音+id+分页模式的调用方法

{dede:field.title runphp=yes}global $dsql,$cfg_cmsurl;$tag = @me;$arcRow = $dsql->GetOne("Select * From `dede_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}

静态页面其他url方式的可以根据上一个自行做下修改。

打赏