$ CATEGORY array in phpcms

Source: Internet
Author: User

1. Purpose
$ CATEGORY is a two-dimensional array mainly used to save the basic configuration information of the current channel or module.

2. How to Set
You can log on to the background to go to the module or channel topic management, and modify any topic settings online to change the parameter value. The system updates the value of corresponding records in phpcms_category and caches the basic information array of each topic. /data/cache/category _ channel ID. php. The system automatically loads the basic configuration information of a module or channel with a topic.

3. Scope of action
The $ CATEGORY array is loaded by default and can be called in any PHP file or template of the current module or channel.

How can I load the topic information of another module or channel?
$ Product_cats = cache_read ('categorys _ product. php'); // Method for loading the topic information of the product Module
$ Cats_1 = cache_read ('categorys _ 1. php'); // Method for loading topic information with Channel ID 1

4. array elements
The following uses the default installed Article channel as an example.

Array
(
[1] => Array
(
[Module] => article
[Channelid] => 1
[Catid] => 1
[Catname] => News
[Style] =>
[Introduce] =>
[Catpic] =>
[Islink] => 0
[Catdir] => xinwen
[Linkurl] =>/2007/phpcms/article/xinwen/
[Parentid] => 0
[Arrparentid] => 0
[Parentdir] =>/
[Child] => 1
[Arrchildid] => 1, 2, 3
[Items] => 0
[Itemordertype] => 0
[Itemtarget] => 0
[Ismenu] => 1
[Islist] => 1
[Ishtml] => 1
[Htmldir] => list
[Prefix] => list _
[Urlruleid] => 0
[Item_prefix] =>
[Item_html_urlruleid] => 0
[Item_php_urlruleid] => 0
)

[5] => Array
(
[Module] => article
[Channelid] => 1
[Catid] => 5
[Catname] => Chinese military
[Style] =>
[Introduce] =>
[Catpic] =>
[Islink] => 0
[Catdir] => guonajunshi
[Linkurl] =>/2007/phpcms/article // guonajunshi/
[Parentid] => 4
[Arrparentid] => 0, 4
[Parentdir] =>/junshi/
[Child] => 0
[Arrchildid] => 5
[Items] => 0
[Itemordertype] => 0
[Itemtarget] => 0
[Ismenu] => 1
[Islist] => 1
[Ishtml] => 1
[Htmldir] => list
[Prefix] => list _
[Urlruleid] => 0
[Item_prefix] =>
[Item_html_urlruleid] => 0
[Item_php_urlruleid] => 0
)

[2] => Array
(
[Module] => article
[Channelid] => 1
[Catid] => 2
[Catname] => domestic news
[Style] =>
[Introduce] =>
[Catpic] =>
[Islink] => 0
[Catdir] => guonaxinwen
[Linkurl] =>/2007/phpcms/article // guonaxinwen/
[Parentid] => 1
[Arrparentid] => 0, 1
[Parentdir] =>/xinwen/
[Child] => 0
[Arrchildid] => 2
[Items] => 5
[Itemordertype] => 0
[Itemtarget] => 0
[Ismenu] => 1
[Islist] => 1
[Ishtml] => 1
[Htmldir] => list
[Prefix] => list _
[Urlruleid] => 0
[Item_prefix] =>
[Item_html_urlruleid] => 0
[Item_php_urlruleid] => 0
)

[3] => Array
(
[Module] => article
[Channelid] => 1
[Catid] => 3
[Catname] => Foreign News
[Style] =>
[Introduce] =>
[Catpic] =>
[Islink] => 0
[Catdir] => guowaixinwen
[Linkurl] =>/2007/phpcms/article // guowaixinwen/
[Parentid] => 1
[Arrparentid] => 0, 1
[Parentdir] =>/xinwen/
[Child] => 0
[Arrchildid] => 3
[Items] => 2
[Itemordertype] => 0
[Itemtarget] => 0
[Ismenu] => 1
[Islist] => 1
[Ishtml] => 1
[Htmldir] => list
[Prefix] => list _
[Urlruleid] => 0
[Item_prefix] =>
[Item_html_urlruleid] => 0
[Item_php_urlruleid] => 0
)

[4] => Array
(
[Module] => article
[Channelid] => 1
[Catid] => 4
[Catname] => military
[Style] =>
[Introduce] =>
[Catpic] =>
[Islink] => 0
[Catdir] => junshi
[Linkurl] =>/2007/phpcms/article/junshi/
[Parentid] => 0
[Arrparentid] => 0
[Parentdir] =>/
[Child] => 1
[Arrchildid] => 4, 5
[Items] => 0
[Itemordertype] => 0
[Itemtarget] => 0
[Ismenu] => 1
[Islist] => 1
[Ishtml] => 1
[Htmldir] => list
[Prefix] => list _
[Urlruleid] => 0
[Item_prefix] =>
[Item_html_urlruleid] => 0
[Item_php_urlruleid] => 0
)

)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.