Index: openacs-4/packages/acs-content-repository/www/doc/api/template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/api/template.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-content-repository/www/doc/api/template.adp 16 Sep 2014 20:51:12 -0000 1.1.2.1 @@ -0,0 +1,128 @@ + +{/doc/acs-content-repository {Content Repository}} {Package: content_template} +Package: content_template + + + +

content_template

+Content Repository : +content_template


 

Overview

Templates are a special class of text objects that are used for +specifying the layout of a content item. They may be mapped to +content types, meaning that every item of that type will display +using that template unless a specific item overrides the default by +mapping to a template itself.

 

Related Objects

+See also: content_item, content_folder +

 

API

Retrieves the full path to the template, as described in +content_item.get_path

+ + + + + + + +
Author:Karl Goldstein
Returns:The path to the template, starting with the +specified root folder
Parameters:
+ + + + + +
template_id:  The id of the template for which the path is to be +retrieved
root_folder_id:  Starts path resolution at this folder
Declaration:

+function get_path (
+  template_id    in cr_templates.template_id%TYPE,
+  root_folder_id in cr_folders.folder_id%TYPE default c_root_folder_id
+) return varchar2;
+
+
See Also:content_item.get_path

 

+ +
Parameters:
Not yet documented
Declaration:

+function get_root_folder return cr_folders.folder_id%TYPE;
+
+

 

Determine if an item is a template.

+ + + + + + + +
Author:Karl Goldstein
Returns:'t' if the item is a template, 'f' otherwise
Parameters:
+ +
item_id:  The item id
Declaration:

+function is_template (
+  template_id   in cr_templates.template_id%TYPE
+) return varchar2;
+
+
See Also:content_template.new

 

Creates a new content template which can be used to render +content items.

+ + + + + + + +
Author:Karl Goldstein
Returns:The id of the newly created template
Parameters:
+ + + + + + + + + + + + + +
name:  The name for the template, must be a valid UNIX-like filename. +If a template with this name already exists under the specified +parent item, an error is thrown
parent_id:  The parent of this item, defaults to null
template_id:  The id of the new template. A new id will be allocated if this +parameter is null
creation_date:  As in acs_object.new +
creation_ip:  As in acs_object.new +
creation_user:  As in acs_object.new +
Declaration:

+function new (
+  name          in cr_items.name%TYPE,
+  parent_id     in acs_objects.context_id%TYPE default null,
+  template_id   in cr_templates.template_id%TYPE default null,
+  creation_date in acs_objects.creation_date%TYPE
+                           default sysdate,
+  creation_user in acs_objects.creation_user%TYPE
+                           default null,
+  creation_ip   in acs_objects.creation_ip%TYPE default null
+) return cr_templates.template_id%TYPE;
+
+
See Also:acs_object.new, content_item.new, +content_item.register_template, content_type.register_template

 

Deletes the specified template, and unregisters the template +from all content types and content items. Use with caution - this +operation cannot be undone.

+ + + + + +
Author:Karl Goldstein
Parameters:
+ +
template_id:  The id of the template to delete
Declaration:

+procedure delete (
+  template_id   in cr_templates.template_id%TYPE
+);
+
+
See Also:acs_object.delete, content_item.unregister_template, +content_type.unregister_template,

 

+Last Modified: $Id: template.html,v 1.1.1.1 2001/03/13 22:59:26 ben +Exp $ +