Menu

Include all files in folder (<#include "snippets/*.ftl">)

Help
2015-02-20
2015-02-20
  • momsenmeister

    momsenmeister - 2015-02-20

    Hi,

    is it possible to include all files in a folder by using an asterisk or similar?
    I'm thinking of sth. like <#include "snippets/*.ftl">

    Thx a lot,
    Mike

     
  • Dániel Dékány

    Sorry, there's no such feature. (The TemplateLoader facility doesn't even have method for listing directories.)

     
  • Dániel Dékány

    However, a custom TemplateLoader could load all matching templates from a directory and "concatenate" them into the same Reader. Then the problem will be with caching; you you later only want to include a template form the same directory, it will be loaded again.

     

Log in to post a comment.