OneThird CMS

Lightweight CMS for Small website, Web application framework.

Download Document


Page array: $ page_ar

Page array is an array that holds the data of the page, is the argument of such a plug-in function

In the source code of OneThird within the CMS, we're using the name roughly $ page_ar

In addition, the pages array currently being drawn, has been housed in the global variable $params ['page']

It should be noted that the inner page also has a similar page array

Page array is housed in the only in inner page drawing $params ['inner_page']

To get the page data directly from the database, you can use the read_pagedata

read_pagedata (page number, storage destination page array);

The configuration of the page array

The main keys are shown in the following page array

$page_ar ['id'] ... page number

$page_ar ['meta'] ... meta-information

$page_ar['date'] ... date

$page_ar['mod_date'] ... last modified

$page_ar ['contens'] ... page contents

$page_ar ['title'] ... page title

$page_ar ['type'] ... page type = 1 usually page = 180 folder (except it, see comments of plugin / plugin.php)

$page_ar ['mode'] ... = 0 draft, = 1 usually page, = 2 top page 3 or more special page (can be used freely)

$page_ar ['block_type'] ... = 1 usually page = 5 inner page

$page_ar ['user'] ... create user ID

$page_ar ['tag'] ... tag

For page type

Page type, is intended to distinguish the normal page and the plug-in page

If the page type is 1, it is considered a normal page, the standard drawing functions basic_renderer is called

Otherwise, it will be called plug-in specific functions (for more information about the page type, see comments of plugin / plugin.php)

In addition, the page type No. 50 (hidden) in a special page for the data storage of the parent page, it will not be able to display it (have been guard on the system)

For meta data

Page metadata, has been housed in a column called metadata in the database

metadata, the sequence data of the I, but is serialized (is stringified) If you want to use it in is housed is must unserialization

In read_pagedata, the metadata is unserialization, metadata storage source to the array named meta Delete

About tag

OneThird tag data of the CMS is not a simple string

It has a special format that houses two types of tags at the same time

And normal tag, is a system tag

Normal tag, you can edit the page properties but has become a specification that can not be corrected by the system tag is not from the program

Tag format

# Tag character, # tag character, @ system tag, @ system tag .....

System tag, for example, use to be housed the directory information in the upper

If folder-systag tag option is ON, the directory structure is described in the following format

dir: page number _ type / page number _ type / ....

For more information folder systag Please refer to the

Google Website Translator - Google Translate