1.3 kiriwrite_page_add

kiriwrite_page_add will add a page to the selected database. If the confirm value is not supplied then it will write out a form for adding a page and if no database is specified then an error is returned saying no database was specified.

kiriwrite_page_add will return data that is intended for kiriwrite_output_page.

Parameters:

kiriwrite_page_add(database, pagefilename, pagename, pagedescription, pagesection, pagetemplate, pagesettings, pagecontent, confirm);

Usage:

$pagedata = kiriwrite_page_add(“database”);
$pagedata = kiriwrite_page_add(“database”, “pagefilename.html”, “Page Name”, “Page Description”, “Page Section”, “pagetemplate.html”, 1, “Page Content, blah, blah, blah, blah”, 1);

database
Specifies the database to add a page to.

pagefilename
Specifies the page filename of the page to add. This is required when adding a page and cannot be blank.

pagename
Specifies the page name for the new page. This is required when adding a page.

pagesection
Specifies the page section for the new page. This is required when adding a page.

pagetemplate
Specifies the page template for the new page. This is required when adding a page and cannot be blank. Specifying '!none' will mean that the page will not use a template at all.

pagesettings
Specifies the page settings for the new page. This is required when adding a page and cannot be blank. The following values specify what should be done to the page when using the <kiriwrite:pagetitle> and <kiriwrite:autosection> tags.

Value Description
0 Don't use the page name or section name.
1 Use the page name and section name.
2 Use the page name only.
3 Use the section name only.

pagecontent
Specifies the page content to use for the new page.

confirm
Specifies if the action to add the page should be confirmed by passing a '1'.