【发布时间】:2013-12-03 18:21:36
【问题描述】:
我设置了模板路径:
class Mustache
self.template_path = 'templates/pages'
end
这很好用。
但是,我想将部分存储在一个单独的文件夹中:templates/partials。
小胡子模板如下所示:
Hello {{ name }}
Your info: {{> info }
info.mustache 是一个部分。
信息部分没有类,所以我不能设置self.template_path。
那么,如何设置一个partial的模板路径,或者有多个模板路径呢?
self.template_path = 'templates'
self.template_path = 'templates/'
self.template_path = 'templates/*'
self.template_path = 'templates/**'
self.template_path = [ 'templates/pages', 'templates/partials' ]
没用。
【问题讨论】: