Home > CMS Tutorial > Empire CMS > How to call the keyword TAG on the Empire CMS list page

How to call the keyword TAG on the Empire CMS list page

silencement
Release: 2019-11-27 13:34:27
forward
2961 people have browsed it

How to call the keyword TAG on the Empire CMS list page

The example in this article describes the method of calling the keyword TAG on the Empire CMS list page. Share it with everyone for your reference. The specific implementation method is as follows:

Copy the following code to the list content template (list.var). Remember to select the list page and 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/search/?searchget=1&tbname=$tbname&tempid=$tempid&show=keyboard&keyboard=".
$r_tag[$i];//链接
$tags.="<a href=&#39;$tagslink&#39; target=&#39;_blank&#39;>".$r_tag[$i]."</a> ";
}
}
$listtemp=&#39;<div class="list-item ">
<h3 class=" course-cate-video ">
<a href="[!--titleurl--]" target="_blank" title="[!--oldtitle--]">[!--title--]</a></h3>
<p title="内容简介">&#39;.$newtext.&#39;...</p>
<p class="meta-tag"><span>标签:</span>&#39;.$tags.&#39;<span class="meta-date">2010-12-16</span>
</p>
</div>&#39;;
Copy after login

The running effect is shown in the figure below:

How to call the keyword TAG on the Empire CMS list page

It is recommended to study "Empirecms Tutorial"

The above is the detailed content of How to call the keyword TAG on the Empire CMS list page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template