Fix template preview to work with chunked content and template post-processing (in Layout, for instance)
This commit is contained in:
parent
b3a1e6cfa3
commit
61245baaaa
3 changed files with 90 additions and 38 deletions
|
|
@ -20,6 +20,7 @@ use WebGUI::Affiliate;
|
|||
use WebGUI::Exception;
|
||||
use WebGUI::Pluggable;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Asset::Template;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -69,6 +70,7 @@ sub handler {
|
|||
$session = WebGUI::Session->open($server->dir_config('WebguiRoot'), $config->getFilename, $request, $server);
|
||||
return Apache2::Const::OK if ! defined $session;
|
||||
}
|
||||
WebGUI::Asset::Template->processVariableHeaders($session);
|
||||
foreach my $handler (@{$config->get("contentHandlers")}) {
|
||||
my $output = eval { WebGUI::Pluggable::run($handler, "handler", [ $session ] )};
|
||||
if ( my $e = WebGUI::Error->caught ) {
|
||||
|
|
@ -107,6 +109,9 @@ sub handler {
|
|||
}
|
||||
}
|
||||
}
|
||||
$session->output->print(
|
||||
WebGUI::Asset::Template->getVariableJson($session), 1
|
||||
);
|
||||
$session->close if defined $session;
|
||||
return Apache2::Const::OK;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue