"extends" in ede templates

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

"extends" in ede templates

Andreas Reuleaux-2
Hi Brendan, Hi mailinglist,

I came across your Haskell ede templates coming from servant,
and servant-ede in particular:

and I got some simple examples running (within servant) similar
to those in


and of course I can play with ede on the ghci repl.
Well, thanks for creating ede in the first place
(and I am therefore CC'ing to the haskell-servant mailing list as well).

Now, I see that one ede template can "include" other ones as explained
in  http://brendanhay.nz/ede/Text-EDE.html, in the section "Includes",
but - coming from other templating systems in Python etc. - it appears
to me, that it is not currently possible that one template "extends"
another one. Is this true?

I assume you know what I mean by extending, but two links nevertheless
for better explanations / examples:

  * you mentioned ede templates being similar to Jinja2 and Liquid
    templates. - Well Jinja2 templates know how extend another one, cf.


    "[...] a child template might look like this:"

        {% extends "base.html" %}
        {% block title %}Index{% endblock %}
        {% block head %}
            {{ super() }}
            <style type="text/css">
                .important { color: #336699; }
        {% endblock %}
        {% block content %}
            <p class="important">
              Welcome to my awesome homepage.
        {% endblock %}

  * I also found an interesting discussion about "extension" of mustache
    (hastache) templates

    which seem similar to ede to me (right?)

I wonder, if it possible / difficult / foreseen to add templates
extension to ede?, any advice on a workaround?

Thanks in advance,