标签: node.js twig template-engine swig-template
在Swig Template Engine中使用include时,如何连接变量和文件?
include
例如:{% include "_partial/{{some var}}.html" %}
{% include "_partial/{{some var}}.html" %}
在树枝上,我可以使用{% include '_partials/' ~ some_variable ~ '.html' %},但在Swig中它似乎不起作用。
{% include '_partials/' ~ some_variable ~ '.html' %}
答案 0 :(得分:1)
您可以使用" +"而不是"〜"