Templates in different sub folder - how to deal with inheritence

87 views
Skip to first unread message

Liu Honghai

unread,
Jul 30, 2015, 3:44:45 PM7/30/15
to mustache.java
Hi there,

my experience with some middle size or big projects, often the templates files are organized in different folders according to functionality.

with mustache.java, it seems easy to do template inheritance with syntax like: {{<base}}.

but say if the base template is in different folder, then we have to use: {{<../base/base}}.

is there a better to manage such case?

thank you!

BR
Honghai


Sam

unread,
Aug 4, 2015, 1:43:07 PM8/4/15
to mustache.java
You can create a custom MustacheResolver that searches multiple DefaultResolvers if you need multiple folders. 

Sam

Liu Honghai

unread,
Aug 5, 2015, 3:07:55 AM8/5/15
to mustache.java
Great! Thanks Sam!

I will try to find out how MustacheResolver works.

BR
Honghai
Reply all
Reply to author
Forward
0 new messages