Index: openacs-4/packages/acs-templating/www/doc/TclDocs/content.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/TclDocs/content.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/doc/TclDocs/content.html 13 Mar 2001 22:59:27 -0000 1.1 +++ openacs-4/packages/acs-templating/www/doc/TclDocs/content.html 7 Aug 2017 23:48:02 -0000 1.2 @@ -51,13 +51,13 @@

Method Detail

-

+

* indicates required

-Public Methods:
-
+Public Methods:
+ @@ -68,34 +68,34 @@
- Parameters: + Parameters:
content::add_attribute_element
- - - - - - - - @@ -107,7 +107,7 @@
form_name + form_name * + The name of the ATS form object to which the element should be added.
content_type + content_type * + The content type keyword to which this attribute belongs.
attribute + attribute * + The name of the attribute, as represented in the attribute_name column of the acs_attributes table.
attribute_data + attribute_data * + Optional nested list of parameter data for the the attribute (generated by get_attribute_params).

-
+ @@ -118,33 +118,33 @@
- Parameters: + Parameters:
content::add_attribute_elements
- - - - - -
form_name + form_name * + The name of the ATS form object to which objects should be added.
content_type + content_type * + The content type keyword for which attribute widgets should be added.
revision_id + revision_id * + The revision from which default values should be queried
-
Returns: +
Returns:
The list of attributes that were added. @@ -154,7 +154,7 @@

-
+ @@ -165,52 +165,52 @@
- Parameters: + Parameters:
content::add_basic_revision
- - - - - -
item_id + item_id * +
revision_id + revision_id * +
title + title * +
-
Options: +
Options: - - + - - + - - + - - + @@ -222,7 +222,7 @@
description +
description
mime_type +
mime_type
text +
text
tmpfile +
tmpfile

-
+ @@ -233,28 +233,28 @@
- Parameters: + Parameters:
content::add_child_relation_element
- -
form_name + form_name * + The name of the form
-
Options: +
Options: - - + + none If present, creates a new form section for the element. - - + @@ -266,7 +266,7 @@
section +
section - none If present, creates a new form section for the element.
label +
label {Child relation tag} The label for the element

-
+ @@ -277,13 +277,13 @@
- Parameters: + Parameters:
content::add_content
- - @@ -295,7 +295,7 @@
revision_id + revision_id * + The object ID of the revision to be updated.

-
+ @@ -306,20 +306,20 @@
- Parameters: + Parameters:
content::add_content_element
- - - - @@ -331,7 +331,7 @@
form_name + form_name * + The name of the form to which the object should be added.
content_method + content_method * + One of no_content, text_entry or file_upload

-
+ @@ -342,20 +342,20 @@
- Parameters: + Parameters:
content::add_revision
- - - - @@ -367,7 +367,7 @@
form_name + form_name * + Name of the form from which to obtain attribute values. The form should include an item_id and revision_id.
tmpfile + tmpfile * + Name of the temporary file containing the content to upload.

-
+ @@ -378,41 +378,41 @@
-
Options: +
Options:
content::add_revision_form
- - + - - + - - + - - + - - + - - + - - + @@ -424,7 +424,7 @@
form_name +
form_name The name of the ATS form object. Defaults to { new_item} .
content_type +
content_type The content_type of the item. Defaults to { content_revision} .
content_method +
content_method The method to use for uploading the content body. If the content type is text, defaults to text entry, otherwise defaults to file upload.
item_id +
item_id The item ID of the revision. Defaults to null (item_id must be set by the calling code).
revision_id +
revision_id The revision ID from which to draw default values. Defaults to the latest revision
attributes +
attributes A list of attribute names for which to create form elements.
action +
action The URL to which the form should redirect following a successful form submission.

-
+ @@ -435,20 +435,20 @@
- Parameters: + Parameters:
content::copy_content
- - - - @@ -460,7 +460,7 @@
revision_id_src + revision_id_src * + The object ID of the revision with the content to be copied.
revision_id_dest + revision_id_dest * + The object ID of the revision to be updated. copied.

-
+ @@ -471,13 +471,13 @@
- Parameters: + Parameters:
content::get_attribute_enum_values
- - @@ -489,7 +489,7 @@
attribute_id + attribute_id * + The primary key of the attribute as in the attribute_id column of the acs_attributes table.

-
+ @@ -500,13 +500,13 @@
- Parameters: + Parameters:
content::get_latest_revision
- - @@ -518,7 +518,7 @@
item_id + item_id * + The ID of the content item.

-
+ @@ -535,7 +535,7 @@
content::get_object_id

-
+ @@ -546,26 +546,26 @@
- Parameters: + Parameters:
content::new_item
- - - -
form_name + form_name * + Name of the form from which to obtain item attributes, as well as attributes of the initial revision. The form should include an item_id, name and revision_id.
tmpfile + tmpfile * + Name of the temporary file containing the content to upload for the initial revision.
-
See Also: +
See Also:
add_revision -
@@ -574,7 +574,7 @@

-
+ @@ -585,41 +585,41 @@
-
Options: +
Options:
content::new_item_form
- - + - - + - - + - - + - - + - - + - - + @@ -631,7 +631,7 @@
form_name +
form_name The name of the ATS form object. Defaults to { new_item} .
content_type +
content_type The content_type of the item. Defaults to { content_revision} .
content_method +
content_method The method to use for uploading the content body. Valid values are { no_content} , { text_entry} , and { file_upload} . If the content type allows text, defaults to text entry, otherwise defaults to file upload.
parent_id +
parent_id The item ID of the parent. Defaults to null (Parent is the root folder).
name +
name The default name of the item. Default is an empty string (User must supply name).
attributes +
attributes A list of attribute names for which to create form elements.
action +
action The URL to which the form should redirect following a successful form submission.

-
+ @@ -642,19 +642,19 @@
- Parameters: + Parameters:
content::validate_name
- -
form_name + form_name * + The name of the form (containing name and parent_id)
-
Returns: +
Returns:
0 if there are items with the same name, 1 otherwise @@ -669,8 +669,8 @@

-Private Methods:
-
+Private Methods:
+ @@ -681,40 +681,40 @@
- Parameters: + Parameters:
content::add_revision_dml
- - - - - - - -
statement + statement * + The DML for the insert statement, specifying a bind variable for each column value.
bind_vars + bind_vars * + An ns_set containing the values for all bind variables.
tmpfile + tmpfile * + The server-side name of the file containing the body of the revision to upload into the content BLOB column of cr_revisions.
filename + filename * + The client-side name of the file containing the body of the revision to upload into the content BLOB column of cr_revisions
-
See Also: +
See Also:
add_revision -
@@ -723,7 +723,7 @@

-
+ @@ -734,34 +734,34 @@
- Parameters: + Parameters:
content::attribute_insert_statement
- - - - - - - - @@ -773,7 +773,7 @@
content_type + content_type * + The content type of the item for which a new revision is being prepared.
table_name + table_name * + The storage table of the content type.
bind_vars + bind_vars * + The name of an ns_set in which to store the attribute values for the revision. (Typically duplicates the contents of {[ns_getform].}
form_name + form_name * + The name of the ATS form object used to process the submission.

-
+ @@ -784,20 +784,20 @@
- Parameters: + Parameters:
content::get_attribute_params
- - - - @@ -809,7 +809,7 @@
content_type + content_type * + The content type keyword to which this attribute belongs.
attribute_name + attribute_name * + The name of the attribute, as represented in the attribute_name column of the acs_attributes table.

-
+ @@ -820,20 +820,20 @@
- Parameters: + Parameters:
content::get_attributes
- - - - @@ -845,7 +845,7 @@
content_type + content_type * + The name of the content type (ACS Object Type) for which to obtain the list of attributes.
args + args * + Names of columns to query. If no columns are specified, returns a simple list of attribute names.

-
+ @@ -856,13 +856,13 @@
- Parameters: + Parameters:
content::get_default_content_method
- - @@ -874,7 +874,7 @@
content_type + content_type * + The content type for which an input method is needed.

-
+ @@ -885,20 +885,20 @@
- Parameters: + Parameters:
content::get_sql_value
- - - - @@ -910,7 +910,7 @@
name + name * + The name of the column and bind variable (they should be the same).
datatype + datatype * + The datatype of the column.

-
+ @@ -921,19 +921,19 @@
- Parameters: + Parameters:
content::get_type_attribute_params
- -
args + args * + Any number of object types
-
Returns: +
Returns:
A list of attribute parameters nested by object_type, attribute_name and the is_html flag. For attributes with no parameters, there is a single entry with is_html as null. @@ -943,7 +943,7 @@

-
+ @@ -954,27 +954,27 @@
- Parameters: + Parameters:
content::get_type_info
- - - - - - @@ -986,7 +986,7 @@
object_type + object_type * + Object type key for which info is required.
ref + ref * + If no further arguments, name of the column value to return. If further arguments are specified, name of the array in which to store info in the calling
args + args * + Column names to query.

-
+ @@ -997,20 +997,20 @@
- Parameters: + Parameters:
content::get_widget_param_value
- - - - @@ -1022,7 +1022,7 @@
array_ref + array_ref * + The name of an array in the calling frame containing parameter data selected from the form metadata.
content_type + content_type * + The current content {type;} defaults to content_revision

-
+ @@ -1033,19 +1033,19 @@
- Parameters: + Parameters:
content::prepare_content_file
- -
form_name + form_name * + The name of the form object in which content was submitted.
-
Returns: +
Returns:
The path of the temporary file containing the content, or an empty string if the form does not include a content element or the value of the element is null. @@ -1055,7 +1055,7 @@

-
+ @@ -1066,34 +1066,34 @@
- Parameters: + Parameters:
content::set_attribute_values
- - - - - - - - @@ -1105,7 +1105,7 @@
form_name + form_name * + The name of the ATS form object containing the attribute elements.
content_type + content_type * + The type of item being revised in the form.
revision_id + revision_id * + The revision ID from where to get the default values
attributes + attributes * + The list of attributes whose values should be set.

-
+ @@ -1116,20 +1116,20 @@
- Parameters: + Parameters:
content::set_content_value
- - - - @@ -1141,7 +1141,7 @@
form_name + form_name * + The name of the ATS form object containing the content element.
revision_id + revision_id * + The revision ID of the content to revise

-
+ @@ -1152,13 +1152,13 @@
- Parameters: + Parameters:
content::string_to_file
- - @@ -1170,7 +1170,7 @@
s + s * + The string to write to the file.

-
+ @@ -1181,20 +1181,20 @@
- Parameters: + Parameters:
content::update_content_from_file
- - - - @@ -1206,7 +1206,7 @@
revision_id + revision_id * + The object ID of the revision to update.
tmpfile + tmpfile * + The name of a temporary file containing the content. The file is deleted following the update.

-
+ @@ -1217,34 +1217,34 @@
- Parameters: + Parameters:
content::upload_content
- - - - - - - - @@ -1258,7 +1258,7 @@

-

+

* indicates required

db + db * + A db handle
revision_id + revision_id * + The revision to which the content belongs
tmpfile + tmpfile * + The server-side name of the file containing the body of the revision to upload into the content BLOB column of cr_revisions.
filename + filename * + The client-side name of the file containing the body of the revision to upload into the content BLOB column of cr_revisions