The Template::Toolkit templates have a different syntax than the default Dancer templating system. You will have to rewrite the existing templates to use TT syntax ([% ... %]) or switch
Template::Toolkit to use <% ... %> as syntax and then look at where the Dancer template system differs from TT.
Update: Just as I've posted this, I also read the same thing in Dancer::Template::TemplateToolkit. It seems you can even switch to <% ... %> syntax from within the config:
template: template_toolkit
engines:
template_toolkit:
start_tag: '[%'
stop_tag: '%]'
Update 2: This is the documentation for Dancer, not Dancer2... For Dancer2, it's the other way around (Dancer2::Template::TemplateToolkit) :
engines:
template:
template_toolkit:
start_tag: '<%'
end_tag: '%>'