process non-TT templates before including them
This commit is contained in:
parent
529743ff8f
commit
538dc2a862
1 changed files with 16 additions and 1 deletions
|
|
@ -63,7 +63,22 @@ sub _template_content {
|
|||
return wantarray ? ( "", $@, 0 ) : "";
|
||||
}
|
||||
|
||||
my $content = $type eq 'template' ? $asset->template : $asset->view;
|
||||
my $content;
|
||||
# If not a TT template, process it.
|
||||
if ( $type eq 'template' ) {
|
||||
if ( $asset->parser ne 'WebGUI::Asset::Template::TemplateToolkit' ) {
|
||||
$content = $asset->process( $self->context->stash );
|
||||
}
|
||||
else {
|
||||
# It may or may not get processed, according to the user's desire
|
||||
$content = $asset->template;
|
||||
}
|
||||
}
|
||||
# Normal assets, call view
|
||||
else {
|
||||
$content = $asset->view;
|
||||
}
|
||||
|
||||
return wantarray ? ( $content, "", $asset->getLastModified ) : $content;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue