% t = '/'.join(path)
% include ${t}
here, "path" is a list like ['home','bla','bla2'].
Thanks!
The %include statement loads the subtemplate at compile time, so there
is no way to pass a dynamic name. But you can just use the
bottle.template() function to do the same with dynamic template names.
This should work:
from bottle import template
tpl = '''
% t = '/'.join(['home','bla','bla2'])
{{template(t)}}
'''
print template(tpl, template=template)
I hope that helped
% from bottle import template
% t = '/'.join(['home','bla','bla2'])
% templ = ''.join(template(t, template=template))
{{templ}}
Thanks again for your help and bottle.py :)