- $self->process("$self->{format}/$action.tmpl", $page_content, \$txt)
- or die sprintf( "template error: %s", $self->error ); # too late for reporting on-line
-
+ if ($target) {
+ $self->process("$self->{format}/$action.tmpl", $page_content, $target)
+ or die sprintf( "template error: %s", $self->error ); # too late for reporting on-line
+ } else {
+ $self->process("$self->{format}/$action.tmpl", $page_content, \$txt)
+ or die sprintf( "template error: %s", $self->error );
+ }