Index: openacs-4/packages/acs-templating/www/doc/TclDocs/item.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/TclDocs/item.adp,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/acs-templating/www/doc/TclDocs/item.adp 27 Oct 2014 16:40:17 -0000 1.2 +++ openacs-4/packages/acs-templating/www/doc/TclDocs/item.adp 25 Aug 2015 18:02:12 -0000 1.2.2.1 @@ -2,17 +2,26 @@ {/doc/acs-templating {Templating}} {} - - -

Namespace item

The item commands allow easy access to properties of +

Namespace item

+
The item commands allow easy access to properties of the content_item object. In the future, a unified API for caching -item properties will be developed here.

Also see:

+item properties will be developed here.
+

Also see:

+
namespace
publish
-

Method Summary

-Listing of public methods:
+ +

Method Summary

+ +Listing of public methods:
+
item::content_is_null
item::content_methods_by_type
item::get_best_revision
item::get_content_type
item::get_extended_url
item::get_id
item::get_item_from_revision
item::get_live_revision
item::get_mime_info
item::get_publish_status
item::get_revision_content
item::get_template_id
item::get_template_url
item::get_title
item::get_url
item::is_publishable
-

Method Detail

-* indicates required

Public Methods:
+ +

Method Detail

+

+* indicates required

+Public Methods: +
+
-
item::content_is_null
Determines if the content for the revision is null (not mereley zero-length)
@@ -25,7 +34,8 @@
Returns:
1 if the content is null, 0 otherwise
+
+
item::content_methods_by_type
Determines all the valid content methods for instantiating a content type. Possible choices are text_entry, @@ -46,7 +56,8 @@
- +
+ -
item::get_best_revision
Attempts to retrieve the live revision for the item. If no live revision exists, attempts to retrieve the latest revision. @@ -62,7 +73,8 @@
+
+ -
item::get_content_type
Retrieves the content type of tyhe item. If the item does not exist, returns an empty string.
@@ -76,7 +88,8 @@ item exists
+
+ -
item::get_extended_url
Retrieves the relative URL of the item with a file extension based on the item's mime_type (Example: { @@ -107,7 +120,8 @@
+
+ -
item::get_id
Looks up the URL and gets the item id at that URL, if any.
@@ -128,7 +142,8 @@
+
+ -
item::get_item_from_revision
Gets the item_id of the item to which the revision belongs.
@@ -142,7 +157,8 @@
+
+ -
item::get_live_revision
Retrieves the live revision for the item. If the item has no live revision, returns an empty string.
@@ -157,7 +173,8 @@
+
+ -
item::get_mime_info
Creates a onerow datasource in the calling frame which holds the mime_type and file_extension of the specified revision. @@ -181,7 +198,8 @@
+
+ -
item::get_publish_status
Get the publish status of the item. The publish status will be one of the following: @@ -207,7 +225,8 @@
+
+ -
item::get_revision_content
Create a onerow datasource called content in the calling frame which contains all attributes for the revision @@ -232,7 +251,8 @@
+
+ -
item::get_template_id
Retrieves the template which can be used to render the item. If there is a template registered directly to the item, @@ -256,7 +276,8 @@
+
+ -
item::get_template_url
Retrieves the relative URL of the template which can be used to render the item. The URL is relative to the TemplateRoot as @@ -278,7 +299,8 @@
+
+ -
item::get_title
Get the title for the item. If a live revision for the item exists, use the live revision. Otherwise, use the latest @@ -293,7 +315,8 @@
+
+ -
item::get_url
Retrieves the relative URL stub to th item. The URL is relative to the page root, and has no extension (Example: { @@ -309,7 +332,8 @@
+
+ -
item::is_publishable
Determine if the item is publishable. The item is publishable only if: @@ -327,6 +351,6 @@
Returns:
1 if the item is publishable, 0 otherwise

+ +

* indicates required

-