I followed this recipe to disable Dancer's "layout" and re-enable TT's "WRAPPER":
How to make a page-specific title in Dancer templates?
which appears to be necessary to change tokens within the layout/wrapper at the route level. Briefly, the linked recipe requires specifying a single layout/wrapper in the config.yml file.
The recipe works great when using one layout/wrapper, but how do I go about changing (or disabling) the template layout/wrapper at the route level?
Since Dancer's native layout is disabled, this does not work:
template('mytemplate', { ... }, { layout => 'some_other_layout' }); # NO GOOD
Also, I tried changing the config prior to rendering template, but that doesn't appear to work either:
# ALSO NO GOOD
config->{'engines'}->{'template_toolkit'}->{'WRAPPER'} = 'some_other_layout';
return template('mytemplate', { ... });
And I also tried using the Dancer set/setting, but also no good:
# ALSO NO GOOD
my $engines = setting('engines');
$engines->{'template_toolkit'}->{'WRAPPER'} = 'some_other_layout';
set engines => $engines;
Any ideas?