publish::handle::text (public)

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

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

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

  template::util::get_opts $args

  if { ![info exists opts(revision_id)] } {
    set revision_id [::content::item::get_live_revision -item_id $item_id]
  } else {
    set revision_id $opts(revision_id)
  }

  if { [info exists opts(embed)] } {
    # Render the child item and embed it in the code
    if { ![info exists opts(no_merge)] } {
      set html [publish::merge_with_template $item_id {*}$args]
    } else {

        db_transaction {
            db_exec_plsql get_revision_id {}

            # Query for values from a previous revision
            set html [db_string get_previous_content ""]
        }
    }
  } else {

    # Just create an include tag

    # Concatenate all the extra html arguments into a string
    if { [info exists opts(html)] } {
      set extra_args $opts(html)
    } else {
      set extra_args ""
    }

    set html [publish::item_include_tag $item_id $extra_args]
  }

  return $html
Generic XQL file:
packages/acs-content-repository/tcl/publish-procs.xql

PostgreSQL XQL file:
<fullquery name="publish::handle::text.get_revision_id">
    <querytext>

        select 1

      </querytext>
</fullquery>

<fullquery name="publish::handle::text.get_previous_content">
    <querytext>

                       select
                         content
                       from
                         cr_revisions
                       where
                         revision_id = :revision_id

      </querytext>
</fullquery>
packages/acs-content-repository/tcl/publish-procs-postgresql.xql

Oracle XQL file:
<fullquery name="publish::handle::text.get_revision_id">
    <querytext>

                begin
                content_revision.to_temporary_clob(:revision_id);
                end;

      </querytext>
</fullquery>

<fullquery name="publish::handle::text.get_previous_content">
    <querytext>

                       select
                         content
                       from
                         cr_content_text
                       where
                         revision_id = :revision_id

      </querytext>
</fullquery>
packages/acs-content-repository/tcl/publish-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: