Search code examples
clojurefunctional-programmingtemplate-engineselmer

How to add a dynamically concatenated file name for "include" tag in Selmer (Clojure)?


I'm new to Clojure. My issue is regarding selmer templating library.

What I want to do is apply a variable for following way. But its not working;

{% include  {{right-page}} %} -------  X

(here right-page is a concatenated sting for a target file name)


Solution

  • If right-page is a valid string you're passing to the page, I think this will work for you

    {% include right-page %}