Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 25 Feb 2007 09:57:09 -0000 1.31 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 27 Feb 2007 21:13:01 -0000 1.32 @@ -569,7 +569,11 @@ [$template set text]] { if {[lsearch $dont_edit $var] == -1} {lappend page_instance_form_atts $var} } - + foreach __var [my field_list] { + set spec [my f.$__var] + set spec [string range $spec [expr {[string first : $spec]+1}] end] + my set f.$__var "$__var:[$data get_field_type $__var $template $spec]" + } foreach __var $page_instance_form_atts { my lappend field_list $__var my set f.$__var "$__var:[$data get_field_type $__var $template [my textfieldspec]]" Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.78 -r1.79 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 26 Feb 2007 07:43:58 -0000 1.78 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 27 Feb 2007 21:13:01 -0000 1.79 @@ -569,7 +569,7 @@ foreach {page_name var_name} [split $s ,] break # in case we have no name (edit new page) we use the first value or the default. set name [expr {[my exists name] ? [my set name] : $page_name}] - #ns_log notice "--w T.name = '[my set name]' var=$page_name, $var_name $field_name []" + #ns_log notice "--w T.name = '$name' var=$page_name, $var_name $field_name " if {[string match $page_name $name] && [string match $var_name $field_name]} { set spec $widget_spec @@ -753,6 +753,7 @@ # get the widget field specifications from the payload of the folder object # for a field with a specified name in a specified page template set spec $default_spec + #ns_log notice "--w pid=[my set parent_id] name='$name' template=[$template set name], specs=[[my set parent_id] get_payload widget_specs]" foreach {s widget} [[my set parent_id] get_payload widget_specs] { foreach {template_name var_name} [split $s ,] break #ns_log notice "--w T.title = '[$template set name]' var=$name" @@ -775,8 +776,9 @@ # set T [my adp_subst [$page_template set text]] # return [my substitute_markup $T] #} - set T [my adp_subst [$page_template set text]] - return [my substitute_markup $T] + set template [$page_template set text] + set T [my adp_subst [lindex $template 0]] + return [my substitute_markup [list $T [lindex $template 1]]] } PageInstance instproc adp_subst {content} { my instvar page_template