在制作pbootcms的TAG标签的时候,生成的URL地址一般为:
https://www.abcmuban.com/seo/?tag=网站建设 ;
https://www.abcmuban.com/seo/?tag=网站优化 ;
应客户需求,将TAG标签列表页路径修改为类似于栏目结构的静态化,比如:https://www.abcmuban.com/tags/网站建设/ ;解决方法如下:
1、打开网站模板,找到调用tag标签之处,将下述标签
{pboot:tags scode=*,*} <a href="[tags:link]">[tags:text]</a> {/pboot:tags}
修改为
{pboot:tags scode=*,* target=tag} <a href="[tags:link]">[tags:text]</a> {/pboot:tags}
注意:target=tag (V2.0.6+)可以指定链接跳转到tags.html独立模板
2、打开tags.html,检查 {pboot:list num=10 order=date scode=* page=1} 是否有限制scode编码
3、检查标题,pbootcms官方模板中TDK调用如下:
<title>{pboot:pagetitle}</title> <meta name="keywords" content="{pboot:pagekeywords}"> <meta name="description" content="{pboot:pagedescription}">
修改为
<title>{$get.tag}_{pboot:pagetitle}</title> <meta name="keywords" content="{$get.tag},{pboot:pagekeywords}"> <meta name="description" content="{pboot:pagedescription}">
4、后台清理缓存,刷新,这样就可以获取到tag标签来做此页面的标题。