3.23 addtemplate
Add a template to the template database. If the template database doesn't exist then it should be created in this subroutine.
Parameters:
$kiriwrite_dbmodule->addtemplate(options);
Usage:
$kiriwrite_dbmodule->addtemplate({ TemplateFilename => “template.html”, TemplateName => “Template Name”, TemplateDescription => “Template Description”, TemplateLayout => “This is the template layout.” });
options
Specifies the following options as a hash in any order.
Value |
Description |
TemplateFilename |
Specifies the template filename to use. |
TemplateName |
Specifies the template name to use. |
TemplateDescription |
Specifies the template description to use. |
TemplateLayout |
Specifies the template layout to use. |
If the template filename already exists when adding the template then the error returned should be 'TemplatePageExists' in the $error scalar.
If the template database cannot be created when adding a template and the template database doesn't already exist then the error returned should be 'TemplateDatabaseFileUncreatable' in the $error scalar.
If (when using a file-based database module) the template database has invalid permissions set then the error returned should be 'TemplateDatabaseInvalidPermissionsSet' in the $error scalar.
If a database error occurs while adding a template to the template database then the error returned should be 'TemplateDatabaseError' in the $error scalar and information about the error should be placed in the $errorext scalar.