当前位置:首页 > 日记本 > 正文内容

destoon7.0移动端列表界面调取tag关键词

zhangchap7个月前 (10-07)日记本150

为了加速搜索引擎的收录和用户的友好度,今天在资讯内容页面加入tags进行聚合优化,这样大大提高相关度,有利于词库的增加。

附上代码:

{if $tag}
<p class="post-tag">
<i class="dt-iconfont dt-icon-pricetag aui-font-size-20 aui-margin-r-5 dt-top-t-1"></i>标签:
{php $tag = str_replace(',', ' ', $tag);}
{php $article_tags = explode(' ', $tag);}
   {loop $article_tags $v}
 <a href="{$MOD[linkurl]}{rewrite('search.php?kw='.urlencode($v))}">{$v}</a>
    {/loop}
</p>
{/if}

转自:https://blog.csdn.net/luo2424348224/article/details/104199413

分享给朋友:

相关文章

lxml win 安装方法

文档地址:https://lxml.de/installation.htmlwindows 下安装不了的都可以在这里找:https://www.lfd.uci.edu/~gohl...

宝塔重启服务器后,Redis就启动不了解决方案

宝塔重启服务器后,Redis就启动不了解决方案

1.更改权限 chown -R redis.redis /www/server/redis/ 2.设置持久化...

python 函数 开启多线程示例

from threading import Thread def readfile(queue:Queue):    &nbs...

python 随机生成时间戳写入txt文件/运行sql语句

import time from random import randint with open('time.txt', ...

python url.parse模块编码解码

from urllib.parse import quote,unquote,urlencode # 对汉字进行编码使用 quote ...

Python 正则表达式 带分组的替换 \g

import re re.sub(r'([^a-z]*)[a-z]([^a-z]*)', '\g<1>\g<2>',wor...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。