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]}
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!