OneThird CMS

Lightweight CMS for Small website, Web application framework.

Download Document


Page correction function: mod_data_items

read_pagedata Please read the earlier description of the

Mod_data_items is useful as a function to modify the page contents

Usage is simple

You only need to specify the fix you want an array element

For example, if you want to modify the title

$page_ar = array();

$page_ar ['id'] = page number

$page_ar['title'] = "change"; 

if (mod_data_items($page_ar)) {

// Success


It can be corrected in

Sequences that are not specified will not be changed

And plug-ins, in the hook function, page array is passed as an argument can be changed without also set the page number so

If it looks like this: If you are loading is carried out directly from the database in a page array read_pagedata

if (read_pagedata(ページ番号,$page_ar)) {

$page_ar['title'] = "change"; 

if (mod_data_items($page_ar)) {

// Success



However, as a caveat, if you want to change the meta data, please note that it may become an unintended behavior

Metadata, ['metadata'] serialization already, will be changed in ['meta'] array, either in the form

In this case, if you find a ['metadata'], it is ignored ['meta']

['Meta'] case of the specified, the array will be merged with previous data

In other words, ['meta'], to be preserved by the Remove a portion of the array, will happening phenomenon that previous state resulting in a revival

If you want to erase the elements of the meta data, please go was always serialized ['metadata']

Google Website Translator - Google Translate