• Publicity: Public Only All

publish-procs.tcl


Procedures in this file

Detailed information

publish::get_html_body (public)

 publish::get_html_body html
Parameters:
html - The html to be processed
Returns:
Everything between the <body> and the </body> tags if they exist; the unchanged HTML if they do not

Partial Call Graph (max 5 caller/called nodes):
%3 publish::render_subitem publish::render_subitem (public) publish::get_html_body publish::get_html_body publish::render_subitem->publish::get_html_body

Testcases:
No testcase defined.

publish::get_mime_handler (public)

 publish::get_mime_handler mime_type
Parameters:
mime_type - The full mime type, such as "text/html" or "image/jpg"
Returns:
The name of the proc which should be used to handle the mime-type, or an empty string on failure.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle_item publish::handle_item (private) publish::get_mime_handler publish::get_mime_handler publish::handle_item->publish::get_mime_handler publish::proc_exists publish::proc_exists (public) publish::get_mime_handler->publish::proc_exists

Testcases:
No testcase defined.

publish::get_page_root (public)

 publish::get_page_root

Get the page root. All items will be published to the filesystem with their URLs relative to this root. The page root is controlled by the PageRoot parameter in CMS. A relative path is relative to $::acs::pageroot The default is $::acs::pageroot

Returns:
The page root
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::get_publish_roots publish::get_publish_roots (public) publish::get_page_root publish::get_page_root publish::get_publish_roots->publish::get_page_root ad_conn ad_conn (public) publish::get_page_root->ad_conn parameter::get parameter::get (public) publish::get_page_root->parameter::get

Testcases:
No testcase defined.

publish::get_publish_roots (public)

 publish::get_publish_roots

Get a list of all page roots to which files may be published. The publish roots are controlled by the PublishRoots parameter in CMS, which should be a space-separated list of all the roots. Relative paths are relative to publish::get_page_root. The default is [list [publish::get_page_root]]

Returns:
A list of all the publish roots
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle_binary_file publish::handle_binary_file (public) publish::get_publish_roots publish::get_publish_roots publish::handle_binary_file->publish::get_publish_roots ad_conn ad_conn (public) publish::get_publish_roots->ad_conn parameter::get parameter::get (public) publish::get_publish_roots->parameter::get publish::get_page_root publish::get_page_root (public) publish::get_publish_roots->publish::get_page_root

Testcases:
No testcase defined.

publish::handle::image (public)

 publish::handle::image item_id [ args... ]

The basic image handler. Writes the image blob to the filesystem, then either merges with the template or provides a default <img> tag. Uses the title for alt text if no alt text is specified externally.

Parameters:
item_id

Partial Call Graph (max 5 caller/called nodes):
%3 db_1row db_1row (public) publish::handle_binary_file publish::handle_binary_file (public) publish::html_args publish::html_args (private) template::util::get_opts template::util::get_opts (public) template::util::is_nil template::util::is_nil (public) publish::handle::image publish::handle::image publish::handle::image->db_1row publish::handle::image->publish::handle_binary_file publish::handle::image->publish::html_args publish::handle::image->template::util::get_opts publish::handle::image->template::util::is_nil

Testcases:
No testcase defined.

publish::handle::text (public)

 publish::handle::text item_id [ args... ]

Return the text body of the item

Parameters:
item_id

Partial Call Graph (max 5 caller/called nodes):
%3 content::item::get_live_revision content::item::get_live_revision (public) db_exec_plsql db_exec_plsql (public) db_string db_string (public) db_transaction db_transaction (public) publish::item_include_tag publish::item_include_tag (public) publish::handle::text publish::handle::text publish::handle::text->content::item::get_live_revision publish::handle::text->db_exec_plsql publish::handle::text->db_string publish::handle::text->db_transaction publish::handle::text->publish::item_include_tag

Testcases:
No testcase defined.

publish::handle_binary_file (public)

 publish::handle_binary_file item_id revision_id_ref url_ref error_ref \
    [ args... ]
Parameters:
item_id - The id of the item to handle
revision_id_ref - {required} The name of the variable in the calling frame that will receive the revision_id whose content blob was written to the filesystem.
url_ref - The name of the variable in the calling frame that will receive the relative URL of the file in the filesystem which contains the content blob
error_ref - The name of the variable in the calling frame that will receive an error message. If no error has occurred, this variable will be set to the empty string ""
Options:
-embed
Signifies that the content should be embedded directly in the parent item. -embed is required for this proc, since it makes no sense to handle the binary file in any other way.
-revision_id
{default The live revision for the item} The revision whose content is to be used
-no_merge
If present, do NOT merge with the template, in order to prevent infinite recursion in the <content> tag. In this case, the proc will return the empty string ""
Returns:
The HTML resulting from merging the item with its template, or "" if no template exists or the -no_merge flag was specified
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle::image publish::handle::image (public) publish::handle_binary_file publish::handle_binary_file publish::handle::image->publish::handle_binary_file content::item::get_live_revision content::item::get_live_revision (public) publish::handle_binary_file->content::item::get_live_revision publish::get_publish_roots publish::get_publish_roots (public) publish::handle_binary_file->publish::get_publish_roots publish::merge_with_template publish::merge_with_template (private) publish::handle_binary_file->publish::merge_with_template publish::write_content publish::write_content (public) publish::handle_binary_file->publish::write_content template::util::get_opts template::util::get_opts (public) publish::handle_binary_file->template::util::get_opts

Testcases:
No testcase defined.

publish::item_include_tag (public)

 publish::item_include_tag item_id [ extra_args ]
Parameters:
item_id - The item id
extra_args (optional) - {} A list of extra parameters to be passed to the include tag, in form {name value name value ...}
Returns:
The HTML for the include tag
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle::text publish::handle::text (public) publish::item_include_tag publish::item_include_tag publish::handle::text->publish::item_include_tag content::item::get_virtual_path content::item::get_virtual_path (public) publish::item_include_tag->content::item::get_virtual_path publish::html_args publish::html_args (private) publish::item_include_tag->publish::html_args

Testcases:
No testcase defined.

publish::mkdirs (public)

 publish::mkdirs path

Create all the directories necessary to save the specified file

Parameters:
path - The path to the file that is about to be saved

Partial Call Graph (max 5 caller/called nodes):
%3 publish::write_multiple_blobs publish::write_multiple_blobs (private) publish::mkdirs publish::mkdirs publish::write_multiple_blobs->publish::mkdirs publish::write_multiple_files publish::write_multiple_files (private) publish::write_multiple_files->publish::mkdirs

Testcases:
No testcase defined.

publish::proc_exists (public)

 publish::proc_exists namespace_name proc_name
Parameters:
namespace_name - The fully qualified namespace name, such as "template::util"
proc_name - The proc name, such as "is_nil"
Returns:
1 if the proc exists in the given namespace, 0 otherwise

Partial Call Graph (max 5 caller/called nodes):
%3 publish::get_mime_handler publish::get_mime_handler (public) publish::proc_exists publish::proc_exists publish::get_mime_handler->publish::proc_exists

Testcases:
No testcase defined.

publish::render_subitem (public)

 publish::render_subitem main_item_id relation_type relation_tag index \
    is_embed extra_args [ is_merge ]
Parameters:
main_item_id - The id of the parent item
relation_type - Either child or relation. Determines which tables are searched for subitems.
relation_tag - The relation tag to look for
index - The relative index of the subitem. The subitem with lowest order_n has index 1, the second lowest order_n has index 2, and so on.
is_embed - If "t", the child item may be embedded directly in the HTML. Otherwise, it may be dynamically included. The proc does not process this parameter directly, but passes it to handle_item
extra_args - Any additional HTML arguments to be used when rendering the item, in form {name value name value ...}
is_merge (defaults to "t") - {default t} If "t", merge_with_template may be used to render the subitem. Otherwise, merge_with_template should not be used, in order to prevent infinite recursion.
Returns:
The rendered HTML for the child item
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 db_list db_list (public) publish::get_html_body publish::get_html_body (public) template::util::is_nil template::util::is_nil (public) publish::render_subitem publish::render_subitem publish::render_subitem->db_list publish::render_subitem->publish::get_html_body publish::render_subitem->template::util::is_nil

Testcases:
No testcase defined.

publish::write_content (public)

 publish::write_content revision_id [ args... ]
Parameters:
revision_id - The id of the revision to write
Options:
-item_id
{default The item_id of the revision} Specifies the item to which this revision belongs (merely for optimization purposes)
-text
If specified, indicates that the content of the revision is readable text (clob), not a binary file
-root_path
{default All paths in the PublishPaths parameter} Write the content to this path only.
Returns:
The relative URL of the file that was written, or an empty string on failure
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle_binary_file publish::handle_binary_file (public) publish::write_content publish::write_content publish::handle_binary_file->publish::write_content content::item::content_is_null content::item::content_is_null (public) publish::write_content->content::item::content_is_null content::item::get content::item::get (public) publish::write_content->content::item::get content::item::get_virtual_path content::item::get_virtual_path (public) publish::write_content->content::item::get_virtual_path db_exec_plsql db_exec_plsql (public) publish::write_content->db_exec_plsql db_string db_string (public) publish::write_content->db_string

Testcases:
No testcase defined.
[ show source ]