Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -r1.106 -r1.107 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 6 Nov 2007 13:06:36 -0000 1.106 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 8 Nov 2007 08:56:56 -0000 1.107 @@ -326,17 +326,30 @@ -parameter { {__decoration none} {parameter_declaration { - {-variable:required } + {-variable} + {-form_variable} {-source ""} }} } -instproc render {} { my get_parameters + if {![info exists variable] && ![info exists form_variable]} { + return "either -variable or -form_variable must be specified" + } set page [my require_page $source] - if {[$page exists $variable]} { + + if {[info exists variable] && [$page exists $variable]} { return [$page set $variable] - } else { - return "no such variable $variable in page [$page set name]" + } + if {[info exists form_variable] && [$page exists instance_attributes]} { + array set __ia [$page set instance_attributes] + if {[info exists __ia($form_variable)]} { + return $__ia($form_variable) + } } + if {[info exists variable]} { + return "no such variable $variable defined in page [$page set name]" + } + return "no such form_variable $form_variable defined in page [$page set name]" } ::xowiki::PortletClass create creation-date \