Master/application layouts with Erlydtl

Go To StackoverFlow.com

2

What's a nice way to do master/application layouts with Erlydtl? With master/application layout I mean separating the main page layout template from template with the pagecontent, but rendering them as one. Think Ruby on Rails application layouts or ASP.NET Master Pages.

2012-04-04 07:09
by Ward Bekker


4

Are you trying to achieve something like:

main.dtl

<html>
  <head></head>
  <body>
    <div id="menu">Menu</div>
    <div id="content">
      {% block content %}{% endblock %}
    </div>
  </body>
</html>

page.dtl

{% extends "main.dtl" %}

{% block content %}
Here's my content
{% endblock %}
2012-04-04 12:54
by Roberto Aloi
Yes, exactly. Th - Ward Bekker 2012-04-04 17:19
Ads