From 9652dcb0a5f4e7667a32205c69aeba509790a61c Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 13 Sep 2020 22:11:45 +0200 Subject: Get rid of master/slave terminology It's both offensive and kinda inaccurate in this context, so let's replace it! --- docu/language_definition.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'docu/language_definition.html') diff --git a/docu/language_definition.html b/docu/language_definition.html index c99a4b9..20ba5dc 100644 --- a/docu/language_definition.html +++ b/docu/language_definition.html @@ -407,29 +407,29 @@

This self-closing tag loads and executes another template. The name parameter (mandatory) defines the template to load.

Because each template must be parseable and compilable by itself, this is not a inclusion of another template. So you can not do this:

- slave.tpl:
+ sub.tpl:

<ste:foo>
bla
- master.tpl
-
<ste:load name="slave.tpl" />
</ste:foo>
+ base.tpl
+
<ste:load name="sub.tpl" />
</ste:foo>

But you can do this:

- slave.tpl:
+ sub.tpl:

<ste:foo>$bar</ste:foo>
- master.tpl
-
<ste:baz>
<ste:load name="slave.tpl" />
</ste:baz>
+ base.tpl
+
<ste:baz>
<ste:load name="sub.tpl" />
</ste:baz>

ste:block

-

ste:block provides an easy way for writing master templates. Every block has a name. When a block is defined twice, the second one will overwrite the first one.

+

ste:block provides an easy way for writing base templates. Every block has a name. When a block is defined twice, the second one will overwrite the first one.

The name can be set with the name parameter.

Example:
- master.tpl + base.tpl

<h1>Content:</h1>
<ste:block name="content">
Default content
</ste:block>
<div class="sidebar">
<ste:block name="sidebar">
Default sidebar
</ste:block>
</div>
- slave.tpl:
-
<ste:load name="master.tpl" />
<ste:block name="content">
Much cooler content :-)
</ste:block>
- When executing slave.tpl, master.tpl will be loaded and its content block will be replaced with the new one (Much cooler content :-)) but leave the original sidebar block. + sub.tpl:
+
<ste:load name="base.tpl" />
<ste:block name="content">
Much cooler content :-)
</ste:block>
+ When executing sub.tpl, base.tpl will be loaded and its content block will be replaced with the new one (Much cooler content :-)) but leave the original sidebar block.

Blocks can not be nested.

-- cgit v1.2.3-54-g00ecf