Index: openacs-4/packages/acs-content-repository/www/doc/guide/template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/guide/template.html,v diff -u -r1.1.1.1 -r1.1.1.1.30.1 --- openacs-4/packages/acs-content-repository/www/doc/guide/template.html 13 Mar 2001 22:59:26 -0000 1.1.1.1 +++ openacs-4/packages/acs-content-repository/www/doc/guide/template.html 22 Jun 2016 07:40:41 -0000 1.1.1.1.30.1 @@ -4,7 +4,7 @@
The content repository allows you to associate templates with both @@ -33,18 +33,18 @@ template. The parent ID must be another content item, or a subclass of content item such as a folder.
-The content_template.new function accepts the standard -creation_date, creation_user, and creation_ip +
The content_template.new function accepts the standard +creation_date, creation_user, and creation_ip auditing parameters.
Content items and templates are organized in two separate hierarchies within the content repository. For example, you may place -all your press releases in the press folder under the item +all your press releases in the press folder under the item root (having the ID returned by -content_item.get_root_folder). You may have 5 different +content_item.get_root_folder). You may have 5 different templates used to render press releases. These my be stored in the -press folder under the template root (having the ID -returned by content_template.get_root_folder).
+press folder under the template root (having the ID +returned by content_template.get_root_folder).Templates are placed under their own root to ensures that bare templates are never accessible via a public URL. This is also done @@ -55,7 +55,7 @@
You use the content_type.register_template procedure to +
You use the content_type.register_template procedure to associate a template with a particular content type:
content_type.register_template( @@ -65,15 +65,15 @@ is_default => 't' );-
The use_context is a simple keyword that specifies the +
The use_context is a simple keyword that specifies the situation in which the template is appropriate. One general context, -public, is loaded when the content repository is installed. +public, is loaded when the content repository is installed. Templates in this context are for presenting content to users of the site. Some sites may wish to distinguish this further, for example -using intranet, extranet and public +using intranet, extranet and public contexts.
-The is_default flag specifies that this template will +
The is_default flag specifies that this template will serve as the default template in the case that no template is registered to a content item of this content type and this use context. Any content type/context pair may have any number of @@ -92,7 +92,7 @@
Individual items may also be associated with templates using the -content_item.register_template procedure:
+content_item.register_template procedure:content_item.register_template( item_id => :item_id, @@ -114,7 +114,7 @@Retrieving the template for a content item
The application server (AOLserver or servlet container) may use the -content_item.get_template function to determine the proper +content_item.get_template function to determine the proper template to use for rendering a page in any particular context:
template_id := content_item.get_template( @@ -127,7 +127,7 @@ );In the case that no template is registered to given item/context -pair, content_item.get_template will return the default +pair, content_item.get_template will return the default template (if it exists) for the related content type/context pair.
Unregistering templates