Search code examples
clojureenlive

Using templates from outside the src folder in enlive


Is it possible to serve a template from outside the source folder in enlive ?

I would like to pickup the templates from my resources/public/templates folder instead of the src/templates folder, how do I do that ?

Thanks, Murtaza


Solution

  • Have you tried including the folder that contains your templates in the class path. I believe enlive will look at your classpath to locate the template you specify.
    If the resources/public folder is already in your classpath your template path should be similar to

    (deftemplate template-name "templates/path/to/template" [] .....)