Forum OpenACS Q&A: Response to New template tag: include-optional

Collapse
Posted by Tom Jackson on

for { set i 0 } { $i < [ns_set size $params] } { incr i } {

  set key [ns_set key $params $i]
  if { [string equal $key src] } { continue }
    
  set value [ns_set value $params $i]

  append command " $key "$value"";# is $value quoted sufficiently?
}
 

The 'for', sets passed in vars. I believe if the included file uses vars set in the parent template or parent tcl file, you have to pass them in.