Template engines like denjucks support extending templates, but when using this, the full template path from the project root needs to get passed.
When for example setting a viewRoot of ./templates, using {% extend 'some_template.html' %} won't work, because some_template.html(which is in the same folder as the current template) won't be found, but when using {% extend 'templates/some_template.html'%}, it will work.
I don't know, how it's for the other template engines, but denjucks supports setting the template root via denjucks.configure("./public");. This could be defined inside the engine file and would avoid using the viewRoot inside the adapters.
Template engines like denjucks support extending templates, but when using this, the full template path from the project root needs to get passed. When for example setting a
viewRoot
of./templates
, using{% extend 'some_template.html' %}
won't work, becausesome_template.html
(which is in the same folder as the current template) won't be found, but when using{% extend 'templates/some_template.html'%}
, it will work. I don't know, how it's for the other template engines, but denjucks supports setting the template root viadenjucks.configure("./public");
. This could be defined inside the engine file and would avoid using the viewRoot inside the adapters.