I am trying to include a template in a template, for example:
parent.tt
<div class="row-fluid">
<div class="span3">
[% INCLUDE my_sidebar]
</div>
</div>
my_sidebar.tt exists in the same folder as parent.tt (/ myapp / views)
I made the following changes to config.yml: With ABSOLUTE
template: "template_toolkit"
engines:
template_toolkit:
encoding: 'utf8'
start_tag: '[%'
end_tag: '%]'
ABSOLUTE : 1
parent.tt contains:
[% INCLUDE /myapps/views/my_sidebar %]
ATTITUDE
template: "template_toolkit"
engines:
template_toolkit:
encoding: 'utf8'
start_tag: '[%'
end_tag: '%]'
RELATIVE : 1
INCLUDE_PATH: /myapps/views
parent.tt contains:
[% INCLUDE my_sidebar %]
But in both cases, I get the following error:
core - template - file error - my_sidebar: not found at /.../csm/64-bit/cpan/5.16.1-2012.09/lib/Dancer/Template/Abstract.pm line 90.
source
share