Dynamic includes

23 views
Skip to first unread message

Andre Nathan

unread,
May 2, 2011, 1:19:15 PM5/2/11
to ErlyDTL Users
Hello

Should this work?

{% with foo="test.html" %}
{% include foo %}
{% endwith %}

I'm getting the following error:

erlydtl:compile("foo.html", foo_template).
{error,{"foo.html",
[{{2,12},
erlydtl_parser,
["syntax error before: ",["foo"]]}]}}


Thanks in advance
Andre

Evan Miller

unread,
May 2, 2011, 2:03:47 PM5/2/11
to erlydt...@googlegroups.com
Includes have to be hard-coded (because ErlyDTL can't/won't compile
templates at run-time).

--
Evan Miller
http://www.evanmiller.org/

Andre Nathan

unread,
May 2, 2011, 2:29:57 PM5/2/11
to ErlyDTL Users
I see. Thanks!
Reply all
Reply to author
Forward
0 new messages