fetch1("select ztid,classid from {$dbtbpre}... ” and save it."/> fetch1("select ztid,classid from {$dbtbpre}... ” and save it.">

Home  >  Article  >  CMS Tutorial  >  How to get the topic name of the current information in the Empire CMS list page

How to get the topic name of the current information in the Empire CMS list page

藏色散人
藏色散人Original
2019-12-12 09:31:482604browse

How to get the topic name of the current information in the Empire CMS list page

This article mainly introduces the method of obtaining the topic name of the current information in the list page of Empire CMS. The topic is obtained through SQL query and judgment combined with the built-in array variable of Empire CMS. Name is a very practical skill. Friends who need it can refer to

How to get the topic name of the current information in the Empire CMS list page?

The example in this article describes the method of obtaining the topic name of the current information in the Empire CMS list page. Share it with everyone for your reference. The specific implementation method is as follows:

Check the program support code. Then add the following code to the template page:

The code is as follows:

//查询该信息是否有专题 
$zhuanti=$empire->fetch1("select ztid,classid from {$dbtbpre}enewsztinfo where id = {$r['id']}"); 
if($zhuanti) 
{ 
//专题名称 
$ztname=$class_zr[$zhuanti['ztid']]['ztname']; 
//专题链接 
$ztlink=sys_ReturnBqZtname($zhuanti); 
}
$listtemp=&#39;<li><a href="[!--titleurl--]" title="[!--oldtitle--]">[!--title--]</a> <span><a href="&#39;.$ztlink.&#39;">&#39;.$ztname.&#39;</a></span><span>[!--newstime--]</span></li>&#39;;

The above is the detailed content of How to get the topic name of the current information in the Empire CMS list page. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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