publish::push_id (private)

 publish::push_id item_id [ revision_id ]

Defined in packages/acs-content-repository/tcl/publish-procs.tcl

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.
Source code:
  variable item_id_stack
  variable revision_html

  if { [template::util::is_nil item_id] } {
    error "Null id pushed on stack in publish::push_id"
  }

  # Determine old configuration
  set old_item_id ""
  set old_revision_id ""

  if { [info exists ::content::item_id] } {
    set old_item_id $::content::item_id
  }

  if { [info exists ::content::revision_id] } {
    set old_revision_id $::content::revision_id
  }

  # Preserve old data
  if { ![template::util::is_nil old_item_id] } {

    set pair [list $old_item_id $old_revision_id]

    if { ![template::util::is_nil item_id_stack] } {
      set item_id_stack [linsert $item_id_stack 0 $pair]
    } else {
      # This is the first id pushed - also clear the cache
      set item_id_stack [list $pair]
      array unset revision_html
    }
  } else {
    set item_id_stack [list]
  }

  # Set new data
  set ::content::item_id $item_id
  set ::content::revision_id $revision_id
Generic 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

[ hide source ]
Show another procedure: