- my %params = ( %locals,
- AUTH => $::auth,
- FLASH => $::form->{FLASH},
- FORM => $::form,
- INSTANCE_CONF => $::instance_conf,
- LOCALE => $::locale,
- LXCONFIG => \%::lx_office_conf,
- LXDEBUG => $::lxdebug,
- MYCONFIG => \%::myconfig,
- SELF => $self,
- );
-
- my $output;
- if (!$options->{raw}) {
- my $parser = $self->_template_obj;
- $parser->process($source, \%params, \$output) || croak $parser->error;
- } else {
- $output = $$source;
- }
+ # Let the presenter do the rest of the work.
+ my $output = $self->presenter->render(
+ $template,
+ { type => $options->{type}, process => $options->{process} },
+ %locals,
+ SELF => $self,
+ );