后台链接
admincp.php?app=应用唯一标识_category
示例:文章栏目管理admincp.php?app=article_category
应用菜单配置
{"caption":"栏目管理","href":"应用唯一标识_category","icon":"list-alt"},{"caption":"添加栏目","href":"应用唯一标识_category&do=add","icon":"edit"},
应用唯一标识可以使用 {app}
代替
示例1:
{"caption":"栏目管理","href":"article_category","icon":"list-alt"},{"caption":"添加栏目","href":"article_category&do=add","icon":"edit"},
示例2:
{"caption":"分类管理","href":"{app}_category","icon":"list-alt"},{"caption":"添加分类","href":"{app}_category&do=add","icon":"edit"},
代码
文件名:应用唯一标识_category.admincp.php
示例:article_category.admincp.php
参考article_category.admincp.php
<?php/*** iCMS - i Content Management System* Copyright (c) 2007-2018 iCMSdev.com. All rights reserved.** @author icmsdev <master@icmsdev.com>* @site https://www.icmsdev.com* @licence https://www.icmsdev.com/LICENSE.html*/defined('iPHP') OR exit('What are you doing?');class article_categoryAdmincp extends categoryAdmincp { public function __construct() { //初始化 传入 iCMS_APP_ARTICLE 文章应用ID parent::__construct(iCMS_APP_ARTICLE,'category'); //配置 //页面显示名称 $this->category_name = "栏目"; //文章应用标识 $this->_app = 'article'; //应用名称 $this->_app_name = '文章'; //应用主表 $this->_app_table = 'article'; //应用栏目字段 $this->_app_cid = 'cid'; /** * 默认模板配置 */ $this->category_template+=array( //'应用标识' => array('名称','模板'), 'article' => array('文章','{iTPL}/article.htm'), 'tag' => array('标签','{iTPL}/tag.htm'), ); /** * 默认URL规则配置 */ $this->category_rule+= array( //'应用标识' => array('名称','规则','伪静态提示'), 'article' => array('文章','/{CDIR}/{YYYY}/{MM}{DD}/{ID}{EXT}','{ID},{0xID},{LINK}'), 'tag' => array('标签','/{CDIR}/t-{TKEY}{EXT}','{ID},{0xID},{TKEY},{NAME},{ZH_CN}') ); /** * URL规则选项 */ $this->category_rule_list+= array( //'应用标识' => array( //array('----'),//分隔符 //array('选项','名称'),//分隔符 //), 'article' => array( array('----'), array('{ID}','文章ID'), array('{0xID}','8位ID'), array('{LINK}','自定义链接'), array('{0x3ID}','8位ID(前3位)',false), array('{0x3,2ID}','8位ID',false), array('{TITLE}','文章标题',false), ), 'tag' => array( array('----'), array('{ID}','标签ID'), array('{0xID}','8位ID'), array('{TKEY}','标签标识'), array('{ZH_CN}','标签名(中文)'), array('{NAME}','标签名'), array('----'), array('{TCID}','分类ID',false), array('{TCDIR}','分类目录',false), ), ); }}?>
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 iCMS, Fastadmin, ClassCMS, LeCMS, PbootCMS, PHPCMS, 易优CMS, YzmCMS, 讯睿CMS, 极致CMS, Wordpress, HkCMS, YznCMS, WellCMS, ThinkCMF, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。