publish::merge_with_template (private)
publish::merge_with_template item_id [ args... ]
Defined in packages/acs-content-repository/tcl/publish-procs.tcl
- Parameters:
- Options:
- item_id (required)
- The item id
- -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):
- Testcases:
- No testcase defined.
Source code: #set ::content::item_id $item_id set ::content::item_url [::content::item::get_virtual_path -item_id $item_id] template::util::get_opts $args # Either auto-get the live revision or use the parameter if { [info exists opts(revision_id)] } { set revision_id $opts(revision_id) } else { set revision_id [::content::item::get_live_revision -item_id $item_id] } # Get the template set ::content::template_url [::content::item::get_template -item_id $item_id -use_context public] if {$::content::template_url eq {}} { ns_log Warning "publish::merge_with_template: no template for item $item_id" return "" } ns_log debug "publish::merge_with_template: template for item $item_id is $::content::template_url" # Get the full path to the template set root_path [content::get_template_root] set file_stub [ns_normalizepath "$root_path/$::content::template_url"] # Set the passed-in variables if { [info exists opts(html)] } { set adp_args $opts(html) } else { set adp_args "" } # Parse the template and return the result publish::push_id $item_id $revision_id ns_log debug "publish::merge_with_template: parsing $file_stub" set html [template::adp_parse $file_stub $adp_args] publish::pop_id return $htmlGeneric XQL file: packages/acs-content-repository/tcl/publish-procs.xql
PostgreSQL XQL file: packages/acs-content-repository/tcl/publish-procs-postgresql.xql
Oracle XQL file: packages/acs-content-repository/tcl/publish-procs-oracle.xql