Home > CMS Tutorial > Empire CMS > How to call column alias in Empire CMS

How to call column alias in Empire CMS

藏色散人
Release: 2019-12-06 09:04:30
Original
3573 people have browsed it

How to call column alias in Empire CMS

How to call the column alias in empire cms?

In the process of creating a new template, because the column name is relatively long, There is no problem in using it in the title, which is good for SEO, but I don’t want it to be so long on the page. Just keep it simple. I mentioned that the column alias is provided. It would be convenient if it can be called.

Please pay attention to the modification method below

After modifying the column alias, use [!--bname--] to call

Open e/class/t_functions.php

The following red parts are new statements.

Search and locate

The code is as follows:

//带模板的栏目导航标签 
修改1 
//替换变量 
$bclassname=$class_r[$classid][classname]; 
$bname=$class_r[$classid][bname]; 
$br[classid]=$classid; 
$bclassurl=sys_ReturnBqClassname($br,9); 
$listtemp=str_replace("[!--bclassname--]",$bclassname,$listtemp); 
$listtemp=str_replace("[!--bname--]",$bname,$listtemp); 
$listtemp=str_replace("[!--bclassurl--]",$bclassurl,$listtemp);
Copy after login

Modify 2

The code is as follows:

$sql=$empire->query("select classid,classname,bname,islast,sonclass,tbname,intro,classimg from {$dbtbpre}enewsclass where bclassid='$classid' and showclass=0 order by myorder,classid".$limit);
Copy after login

Modify 3

Code As follows:

//栏目名称 
$listtemp=str_replace("[!--classname--]",$r[classname],$listtemp); 
//栏目别名 
$listtemp=str_replace("[!--bname--]",$r[bname],$listtemp); 
//栏目id 
$listtemp=str_replace("[!--classid--]",$r[classid],$listtemp);
Copy after login

Recommended to study "Empirecms Tutorial"

The above is the detailed content of How to call column alias in Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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