Classic Empire CMS custom function method to obtain the top column name
The example in this article describes the method of obtaining the top-level column name through the custom function of Empire CMS. Share it with everyone for your reference. The specific implementation method is as follows:
Step 1: Copy the following code
The code is as follows:
//取得顶级栏目名称函数 function user_GetTopBclassname($classid){ global $class_r; $fr=explode('|',$class_r[$classid][featherclass]); $topbclassid=$fr[1]?$fr[1]:$classid;//取得第一级栏目id $topbclassname=$class_r[$topbclassid][classname];//第一级栏目名称 $cr[classid]=$topbclassid; $topbclassurl=sys_ReturnBqClassname($cr,9); //第一级栏目链接 return "".$topbclassname.""; }
Copy all the above codes. . .
Recommended to study "Empire cms tutorial"
Step 2: Copy the above code and save it as a *.bq format file, and then go to Template Management-Tag-Manage Tags , follow the instructions to import tags.
Step 3: Repeat the first step (copy those codes) and copy it to e\class\userfun.php, remember to put it in the middle (put it in the original tag inside).
Step 4: Just call it in the template you want to use, the code is as follows:
The code is as follows:
<?=user_GetTopBclassname($GLOBALS[navclassid])?>
Hope this article The above will be helpful to everyone’s Imperial CMS website building.
The above is the detailed content of Classic Empire CMS custom function method to obtain the top column name. 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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

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

Zend Studio 13.0.1
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)