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

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

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
