Index: openacs-4/packages/xowiki/lib/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/view.tcl,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/xowiki/lib/view.tcl 21 May 2019 07:57:54 -0000 1.14.2.2 +++ openacs-4/packages/xowiki/lib/view.tcl 20 Dec 2019 15:43:18 -0000 1.14.2.3 @@ -1,21 +1,26 @@ +ad_include_contract { + View a page +} { + item_id:naturalnum,optional + url:localurl,optional + template_file:optional +} + set parameter [subst { {-m view} {-return_url "[ns_conn url]"} {-template_file "view-links"} {-folder_id 0} }] -# TODO the following should be done more elegantly -set actual_query [expr {[info exists template_file] ? "template_file=$template_file" : " "}] - if {[info exists url]} { # # New style, the URL is sufficient # ::xowiki::Package initialize \ -parameter $parameter \ -url $url \ - -actual_query $actual_query + -actual_query [export_vars -no_empty template_file] } else { # # Old style, use item_id.