publish-procs.tcl


Procedures in this file

Detailed information

publish::foreach_publish_path (private)

 publish::foreach_publish_path url code [ root_path ]
Parameters:
url - Relative URL to append to the roots
code - Execute this code
root_path (optional) - {default The empty string} Use this root path instead of the paths specified in the INI file
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::write_multiple_blobs publish::write_multiple_blobs (private) publish::foreach_publish_path publish::foreach_publish_path publish::write_multiple_blobs->publish::foreach_publish_path publish::write_multiple_files publish::write_multiple_files (private) publish::write_multiple_files->publish::foreach_publish_path template::util::is_nil template::util::is_nil (public) publish::foreach_publish_path->template::util::is_nil

Testcases:
No testcase defined.

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_main_item_id (private)

 publish::get_main_item_id
Returns:
the main item id
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl publish::get_main_item_id publish::get_main_item_id packages/acs-templating/tcl/tag-init.tcl->publish::get_main_item_id publish::get_main_revision_id publish::get_main_revision_id (private) publish::get_main_revision_id->publish::get_main_item_id template::util::is_nil template::util::is_nil (public) publish::get_main_item_id->template::util::is_nil

Testcases:
No testcase defined.

publish::get_main_revision_id (private)

 publish::get_main_revision_id
Returns:
the main item id
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl publish::get_main_revision_id publish::get_main_revision_id packages/acs-templating/tcl/tag-init.tcl->publish::get_main_revision_id content::item::get_live_revision content::item::get_live_revision (public) publish::get_main_revision_id->content::item::get_live_revision publish::get_main_item_id publish::get_main_item_id (private) publish::get_main_revision_id->publish::get_main_item_id template::util::is_nil template::util::is_nil (public) publish::get_main_revision_id->template::util::is_nil

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::handle_item (private)

 publish::handle_item item_id [ args... ]
Parameters:
item_id - The id of the item to be rendered
Options:
-revision_id
{default The live revision} The revision which is to be used when rendering the item
-no_merge
Indicates that the item should NOT be merged with its template. This option is used to avoid infinite recursion.
-refresh
Re-render the item even if it exists in the cache. Use with caution - circular dependencies may cause infinite recursion if this option is specified
-embed
Signifies that the content should be statically embedded directly in the HTML. If this option is not specified, the item may be dynamically referenced, f.ex. using the <include> tag
-html
Extra HTML parameters to be passed to the item handler, in format {name value name value ...}
Returns:
The rendered HTML for the item, or an empty string on failure
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 content::item::get content::item::get (public) content::item::get_live_revision content::item::get_live_revision (public) publish::get_mime_handler publish::get_mime_handler (public) template::util::get_opts template::util::get_opts (public) template::util::is_nil template::util::is_nil (public) publish::handle_item publish::handle_item publish::handle_item->content::item::get publish::handle_item->content::item::get_live_revision publish::handle_item->publish::get_mime_handler publish::handle_item->template::util::get_opts publish::handle_item->template::util::is_nil

Testcases:
No testcase defined.

publish::html_args (private)

 publish::html_args argv
Parameters:
argv - The list of name-value pairs
Returns:
An HTML string in format "name=value name=value ..."

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

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::merge_with_template (private)

 publish::merge_with_template item_id [ args... ]
Parameters:
item_id - The item id
Options:
-revision_id
{default The live revision} The revision which is to be used when rendering the item
-html
Extra HTML parameters to be passed to the ADP parser, in format {name value name value ...}
Returns:
The rendered HTML, or the empty string on failure
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle::text publish::handle::text (public) publish::merge_with_template publish::merge_with_template publish::handle::text->publish::merge_with_template publish::handle_binary_file publish::handle_binary_file (public) publish::handle_binary_file->publish::merge_with_template content::get_template_root content::get_template_root (public) publish::merge_with_template->content::get_template_root content::item::get_live_revision content::item::get_live_revision (public) publish::merge_with_template->content::item::get_live_revision content::item::get_template content::item::get_template (public) publish::merge_with_template->content::item::get_template content::item::get_virtual_path content::item::get_virtual_path (public) publish::merge_with_template->content::item::get_virtual_path publish::pop_id publish::pop_id (private) publish::merge_with_template->publish::pop_id

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::pop_id (private)

 publish::pop_id
Returns:
The popped item id, or the empty string if the string is already empty
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::merge_with_template publish::merge_with_template (private) publish::pop_id publish::pop_id publish::merge_with_template->publish::pop_id template::util::is_nil template::util::is_nil (public) publish::pop_id->template::util::is_nil

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::process_tag (private)

 publish::process_tag relation_type params
Parameters:
relation_type - Either child or relation
params - The ns_set id for extra HTML parameters
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl publish::process_tag publish::process_tag packages/acs-templating/tcl/tag-init.tcl->publish::process_tag template::adp_append_code template::adp_append_code (public) publish::process_tag->template::adp_append_code template::get_attribute template::get_attribute (public) publish::process_tag->template::get_attribute

Testcases:
No testcase defined.

publish::push_id (private)

 publish::push_id item_id [ revision_id ]
Parameters:
item_id - The id to be put on stack
revision_id (optional) - {default ""} The id of the revision to use. If missing, live revision will most likely be used
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::merge_with_template publish::merge_with_template (private) publish::push_id publish::push_id publish::merge_with_template->publish::push_id template::util::is_nil template::util::is_nil (public) publish::push_id->template::util::is_nil

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.

publish::write_multiple_blobs (private)

 publish::write_multiple_blobs url revision_id [ root_path ]
Parameters:
url - Relative URL of the file to write
revision_id - Write the blob for this revision
root_path (optional) - Use this root path (default empty)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::write_content publish::write_content (public) publish::write_multiple_blobs publish::write_multiple_blobs publish::write_content->publish::write_multiple_blobs db_1row db_1row (public) publish::write_multiple_blobs->db_1row db_blob_get_file db_blob_get_file (public) publish::write_multiple_blobs->db_blob_get_file publish::foreach_publish_path publish::foreach_publish_path (private) publish::write_multiple_blobs->publish::foreach_publish_path publish::mkdirs publish::mkdirs (public) publish::write_multiple_blobs->publish::mkdirs

Testcases:
No testcase defined.

publish::write_multiple_files (private)

 publish::write_multiple_files url text [ root_path ]
Parameters:
url - Relative URL of the file to write
text - A string of text to be written to the URL
root_path (optional) - Use this root path (default empty)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::write_content publish::write_content (public) publish::write_multiple_files publish::write_multiple_files publish::write_content->publish::write_multiple_files publish::foreach_publish_path publish::foreach_publish_path (private) publish::write_multiple_files->publish::foreach_publish_path publish::mkdirs publish::mkdirs (public) publish::write_multiple_files->publish::mkdirs template::util::write_file template::util::write_file (public) publish::write_multiple_files->template::util::write_file

Testcases:
No testcase defined.
[ show source ]