hmm, still trying to understand.
This means you would always call the base page, and as variant use the
actual pages.
I can see this solves some parts.. but not everything.
For exmaple I want 'pull' the title in the head from the page inside
the base template.
I don't want to create separate templates with variant for this.
I'm looking for something similar like Sitemesh (Java) or Jinja2
(Python) which support Template Inheritance
http://jinja.pocoo.org/docs/templates/#template-inheritance
E.g. base template
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
{% block head %}
<link rel="stylesheet" href="style.css" />
<title>{% block title %}{% endblock %} - My Webpage</title>
{% endblock %}
</head>
<body>
<div id="content">{% block content %}{% endblock %}</div>
<div id="footer">
{% block footer %}
© Copyright 2008 by <a href="
http://domain.invalid/">you</
a>.
{% endblock %}
</div>
</body>
and the child template:
{% extends "base.html" %}
{% block title %}Index{% endblock %}
{% block head %}
{{ super() }}
<style type="text/css">
.important { color: #336699; }
</style>
{% endblock %}
{% block content %}
<h1>Index</h1>
<p class="important">
Welcome on my awesome homepage.
</p>
{% endblock %}
I'm sorry I/m overflooding with other languages/frameworks, but I
think this is the easiest way to explain for what I'm looking for.
It would be greate if I can use the delegate templates and variants
for it, but I'm missing the point at the moment.
Thanks for your patience.
On 12 apr, 13:08, Johannes Nel <
johannes....@gmail.com> wrote:
> this is exactly what delegate templates allow you to do. consider this
>
> {tremplate page}
> {delcall header/}
> {delcall body variant="$variant"/}
> {delcall footer}
> {/template}
>
> ...the standard implementations of those
>
> {deltemplate body variant="'your-page"} your crap in here{/deltemplate}
>
> variants and delegates solve this very nicely.
>
> On Fri, Apr 12, 2013 at 12:02 PM, Marcel Overdijk
> <
marceloverd...@gmail.com>wrote: