Classification name and category name calling of phpcms

怪我咯
Release: 2023-03-12 16:12:01
Original
2447 people have browsed it

This article mainly introduces the category name and category name calling of phpcms. It has certain reference value. Let’s take a look at it with the editor.

Without further ado, please look at the code:

//在需要调用的模板前写这句代码,$CATEGORYS 代表分类,$TYPE 代表类别(没有这句话,调不出来)
{php $CATEGORYS = getcache('category_content_'.$siteid,'commons');$TYPE = getcache('type_content','commons');}

//调用
{$TYPE[$typeid]['name']}      //$typeid代表分类的id(在后台可以看到)
{$CATEGORYS[$catid][catname]}  //$catid代表分类的id(在后台可以看到)

//通过子栏目的id获取父类的id和名称
父栏目id:{$CATEGORY[$catid][parentid]}
父栏目名称:{$CATEGORYS[$CAT[parentid]][catname]}
Copy after login

The above is the detailed content of Classification name and category name calling of phpcms. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!