xowiki::Package instproc www-import-prototype-page (public)

 <instance of xowiki::Package[i]> www-import-prototype-page \
    [ -add_revision on|off ] [ -lang lang ] [ -parent_id parent_id ] \
    [ prototype_name ]

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

This web-callable method is designed for admin to ease the import of prototpye pages. When called via web, the query parameter "import-prototype-page" determines the page for the import.

Switches:
-add_revision
(boolean) (defaults to "true") (optional)
-lang
(defaults to "en") (optional)
-parent_id
(optional)
Parameters:
prototype_name (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_form_with_form_instance create_form_with_form_instance (test xowiki) xowiki::Package instproc www-import-prototype-page xowiki::Package instproc www-import-prototype-page test_create_form_with_form_instance->xowiki::Package instproc www-import-prototype-page ad_urlencode_folder_path ad_urlencode_folder_path (public) xowiki::Package instproc www-import-prototype-page->ad_urlencode_folder_path

Testcases:
create_form_with_form_instance
Source code:
set page ""
if {$prototype_name eq ""} {
  set prototype_name [:query_parameter import-prototype-page ""]
  set via_url 1
}
if {![info exists parent_id]} {
  set parent_id ${:folder_id}
}
if {$prototype_name eq ""} {
  error "No name for prototype given"
}

set page [::xowiki::Package import_prototype_page  -package_key [:package_key]  -name $prototype_name  -lang $lang  -parent_id $parent_id  -package_id ${:id}  -add_revision $add_revision]

if {[info exists via_url] && [:exists_query_parameter "return_url"]} {
  :returnredirect [:query_parameter "return_url:localurl" [ad_urlencode_folder_path ${:package_url}]]
} else {
  return $page
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: