How to call tags from list.var on the empire cms list page?
List page list.var calls tags. Many friends want to implement this function. This article has collected and compiled some practical codes and posted them to share with everyone. I hope it can help you solve the problem. If you are interested You can refer to the
recommendation to learn "Empire cms tutorial"
Copy the following code to the list content template (list.var), remember to select the list page: Use the program code
The code is as follows:
$nsmalltext=$r[smalltext]; $ntext=strip_tags($nsmalltext);//去除内容简介里的HTML标签 $newtext=esub($ntext,100,'...') ;//限制100字 $keyboard=$r[keyboard]; $r_tag=explode(",",$keyboard); $tempid=1;//这里是搜索模板ID for($i=0;$i<count($r_tag);$i++) { if($r_tag[$i]) { $tagslink=$public_r[newsurl]."e/tags/?tagname=".$r_tag[$i];//链接 $tagslink=$public_r[newsurl]."e/search/?searchget=1&tbname=$tbname& amp;tempid=$tempid&show=keyboard&keyboard=".$r_tag[$i];//如果链接到搜索 页面用此行代码,如果不是请删除 $tags.="<a href='$tagslink' target='_blank'>".$r_tag[$i]."</a> "; } } $listtemp='<div class="m_2"> <div class="m_2_a"><a href="/html/10752.html" title="[!--oldtitle--]">[!--title--]</a>[[!--newstime--]]</div> <p> [!--smalltext--]...<a href="/html/10752.html" class="link2">[详情]</a></p> <div class="cont_4">标签:'.$tags.'</div> <div class="cont_2"><span>来源:</span>HK吧<span>作者:</span>www.haik8.com <span>点击率:</span>708</div> </div>';
The above is the detailed content of How to call tags in list.var of empire cms list page. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 English version
Recommended: Win version, supports code prompts!

Notepad++7.3.1
Easy-to-use and free code editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
