OneThird CMS

Lightweight CMS for Small website, Web application framework.

Download Document

japanese

Add or delete a page: create_page, ot.add_page etc.

To add a page in the program, you can easily add the following code

●php

$r = array(); 

$r['result'] = false; 

$r['type'] = TOPIC_ITEM_ID; //plugin ID

$r ['link'] = $ p_page; // upper page (optional)

$r ['user'] = $ user; // default, the login user 

$r ['mode'] = 1; // publish (= draft in 0)

$r['metadata'] = $meta; // Optional

if (create_page( $r )) {

  return false;

}

Result in $r ['result'], $r ['id'] page ID that was created in, the URL that has been created in the $r ['open_url'] return


●javascript

ot.add_page(); .. parent page

ot.add_page(page_id); .. inner page

ot.add_page(page_id,true); .. lower page


Similarly, to delete a page in the program, you can easily add the following code

●php

remove_this_page(page number);

Delete specific page or less, the lower pages including

remove_page (page number);

Delete only the specific page


●javascript

ot.remove_page (page number)

Delete specific page or less, the lower pages including




Google Website Translator - Google Translate