[dancer-users] TT

Rick Leir richard.leir at canadiana.ca
Wed Nov 4 16:49:44 GMT 2015


TemplateToolkit default tags are [% hi %]

ref:
http://search.cpan.org/~abw/Template-Toolkit-2.26/lib/Template/Manual/Config.pod#START_TAG,_END_TAG

Dancer2 tutorial mentions this default
ref: lib/Dancer2/Tutorial.pod

In Dancer2 I had to configure these to get going:

template:   "template_toolkit"
charset: UTF-8
engines:
    template:
        template_toolkit:
          ENCODING: utf8
          INCLUDE_PATH: 'views'
          start_tag: '[%'
          end_tag:   '%]'

But then, the rendered template contained <% content %> in place of my tt.
To get my code working, I changed my .tt files to use <% hi %> and changed
the config tags:
          start_tag: '<%'
          end_tag:   '%>'

Is there an easier way to use Template::Toolkit in Dancer2? Yes, I should
use Dancer2's simple template.
Thanks
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20151104/d25153fa/attachment.html>


More information about the dancer-users mailing list