xowiki::Page instproc include (public)

 <instance of xowiki::Page[i]> include [ -configure configure ] arg

Defined in packages/xowiki/tcl/xowiki-procs.tcl

Include the html of the includelet. The method generates an includelet object (might be another xowiki page) and renders it and returns either html or an error message.

Switches:
-configure
(optional)
Parameters:
arg

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_form_with_form_instance create_form_with_form_instance (test xowiki) xowiki::Page instproc include xowiki::Page instproc include test_create_form_with_form_instance->xowiki::Page instproc include test_includelet_childresources includelet_childresources (test xowiki) test_includelet_childresources->xowiki::Page instproc include test_includelet_toc includelet_toc (test xowiki) test_includelet_toc->xowiki::Page instproc include _ _ (public) xowiki::Page instproc include->_

Testcases:
includelet_toc, includelet_childresources, create_form_with_form_instance
Source code:
set page [:instantiate_includelet $arg]
if {$page eq "" || ![nsf::is object $page]} {
  # The variable 'page_name' is required by the message key
  set page_name [ns_quotehtml $arg]
  return [:error_during_render [_ xowiki.error-includelet-unknown]]
}
if {[$page istype ::xowiki::Page]} {
  set package_id [$page package_id]
  set allowed [[::$package_id set policy] check_permissions  -package_id $package_id  -user_id [::xo::cc set untrusted_user_id]  $page view]
  if {!$allowed} {
    return "<div class='errorMsg'>Insufficient privileges to view content of [$page name].</div>"
  }
}
if {[info exists configure]} {
  $page configure {*}$configure
}
return [:render_includelet $page]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: