1.4 kiriwrite_page_edit

kiriwrite_page_edit will edit a page from the selected database. If the confirm value is not supplied then it will write a form for editing a page and if no database and page filename is specified then an error is returned saying no database was specified.

kiriwrite_page_edit will return data that is intended for kiriwrite_output_page.

Parameters:

kiriwrite_page_edit(database, filename, newfilename, newname, newdescription, newsection, newtemplate, newsettings, newcontent, confirm);

Usage:

$pagedata = kiriwrite_page_edit("database", "oldfilename.html");
$pagedata = kiriwrite_page_edit("database", "oldfilename.html", "newfilename.html", "New Page Filename", "New Page Description", "New Page Section", "newtemplate.html", 0, "New Page Content, blah, blah, blah, blah", 1);

database
Specifies the database to edit the page from. This is required every time the subroutine is called.

filename
Specifies the page with the filename to edit. This is required every time the subroutine is called.

newfilename
Specifies the new page filename to use when editing a page. If you specify the same filename as the one given in the filename parameter then the filename of the page is not changed. This is required when actually editing a page and cannot be blank.

newname
Specifies the new page name to use when editing a page. This is required when actually editing a page.

newdescription
Specifies the new description to use when editing a page. This is required when actually editing a page.

newsection
Specifies the new section to use when editing a page. This is required when actually editing a page.

newtemplate
Specifies the new template filename to use when editing a page. This is required when actually editing a page and cannot be blank.

newsettings
Specifies the new settings to use when editing a page. This is required when actually editing 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.

newcontent
Specifies the new content to use when editing a page. This is required when actually editing a page.

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