Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The realization method of obtaining Top-level column name by Imperial CMS Custom function

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about the implementation of the Imperial CMS custom function to get the top-level column name. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Step 1: copy the following code

The code is as follows:

/ / get the top-level column name function function user_GetTopBclassname ($classid) {global $class_r;$fr=explode ('|', $class_r [$classid] [featherclass]); $topbclassid=$fr [1]? $fr [1]: $classid;// gets the first-level column id$topbclassname=$class_r [$topbclassid] [classname]; / / the first-level column name $crudd = $topbclassid;$topbclassurl=sys_ReturnBqClassname ($cr,9); / / the first-level column link return ". $topbclassname.";}

All the above codes should be copied.

Recommended to learn the Imperial cms course

Step 2: copy the above code and save it as a * .bq format file, then go to template Management-tags-manage tags, and import tags as described.

Step 3: repeat the first step (copy the code) and copy it to e\ class\ userfun.php, remember to put it in the middle (inside the original tag).

Step 4: just call it in the template you want to use. The code is as follows:

The code is as follows:

Thank you for reading! On the Empire CMS custom function to get the top-level column name of the implementation method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report