diff --git a/theme/templates/base.html b/theme/templates/base.html
index 0c78d03e3b598277f6a97beaf4ce0d8ac2459d2d..d7e6610cef749287c413161279a34b3768bbc629 100644
--- a/theme/templates/base.html
+++ b/theme/templates/base.html
@@ -7,54 +7,9 @@ Hurra!!! lang ist definiert als {{ lang }}.
 {{ diese_variable_existiert_nicht_werfe_fehler }}
 {%- endif -%}
 
-{%- macro category_by_name(catname, ignore_native = False) -%}
-	{%- if ignore_native -%}
-		{{- caller(null, sc.categories[catname], null) -}}
-	{%- else -%}
-		{%- for nativecat, catarticles in categories -%}
-			{%- if nativecat.name == catname -%}
-				{{- caller(nativecat, sc.categories[catname], catarticles) -}}
-			{%- endif -%}
-		{%- endfor -%}
-	{%- endif -%}
-{%- endmacro -%}
-
-{%- macro tag_by_name(tagname) -%}
-	{%- for nativetag, tagarticles in tags -%}
-		{%- if nativetag.name == tagname -%}
-			{{- caller(nativetag, tagarticles) -}}
-		{%- endif -%}
-	{%- endfor -%}
-{%- endmacro -%}
-
-{%- macro article_by_slug(slug, lang) -%}
-	{%- for a in all_articles -%}
-		{%- if a.slug == slug and a.lang == lang -%}
-			{{- caller(a) -}}
-		{%- endif -%}
-	{%- endfor -%}
-{%- endmacro -%}
-
-{%- macro page_by_slug(slug, lang) -%}
-	{%- for p in pages -%}
-		{%- if p.slug == slug and p.lang == lang -%}
-			{{- caller(p) -}}
-		{%- endif -%}
-	{%- endfor -%}
-{%- endmacro -%}
-
-{%- macro article_or_page_by_slug(slug, lang) -%}
-	{%- for a in all_articles -%}
-		{%- if a.slug == slug and a.lang == lang -%}
-			{{- caller(a) -}}
-		{%- endif -%}
-	{%- endfor -%}
-	{%- for p in pages -%}
-		{%- if p.slug == slug and p.lang == lang -%}
-			{{- caller(p) -}}
-		{%- endif -%}
-	{%- endfor -%}
-{%- endmacro -%}
+{%- import 'macros/getters.html' as get with context -%}
+{%- import 'macros/cards.html' as cards with context -%}
+{%- import 'macros/renderers.html' as render with context -%}
 
 <html lang="{%- block html_lang -%}{{ DEFAULT_LANG }}{%- endblock html_lang -%}">
 <head>
@@ -93,12 +48,12 @@ Hurra!!! lang ist definiert als {{ lang }}.
 			<ul>
 			{% for item in sc.menuitems -%}
 				{%- if item.category is defined -%}
-					{%- call(nativecat, sccat, _) category_by_name(item.category) -%}
+					{%- call(nativecat, sccat, _) get.category_by_name(item.category) -%}
 						<li style="--category-color: {{ sccat.color }}"><a href="{{ SITEURL }}/{{ nativecat.url }}">{{ sccat[lang]|e }}</a></li>
 					{%- endcall -%}
 				{%- elif item.slug is defined -%}
-					{%- call(aop) article_or_page_by_slug(item.slug, lang) -%}
-					{%- call(_, sccat, __) category_by_name(aop.category.name, True) -%}
+					{%- call(aop, _) get.article_or_page_by_slug(item.slug, lang) -%}
+					{%- call(__, sccat, ___) get.category_by_name(aop.category.name, True) -%}
 						<li style="--category-color: {{ sccat.color }}"><a href="{{ SITEURL }}/{{ aop.url }}">{{ aop.title }}</a></li>
 					{%- endcall -%}
 					{%- endcall -%}
@@ -113,8 +68,8 @@ Hurra!!! lang ist definiert als {{ lang }}.
 		</nav>
 	</div>
 	<main>
-        {% block content %}
-        {% endblock content %}
+	{% block content %}
+	{% endblock content %}
 	</main>
 	<footer>
 		{% block footer %}
diff --git a/theme/templates/category.html b/theme/templates/category.html
index 084bda886fac8aad092756ea8677d3733cd575e1..e73988ee9bce657a67b0040dc70063abe4efdc9f 100644
--- a/theme/templates/category.html
+++ b/theme/templates/category.html
@@ -1,7 +1,7 @@
-{% extends "index.html" %}
+{% extends "base.html" %}
 {% block title %}{{ l[lang].title_prefix }}{{ l[lang].sitename }}{{ l[lang].title_suffix }} - {{ category }}{%endblock%}
 {% block content %}
 	<section>
-		{{ render_section({"type": "category", "category": category.slug, "num": 5000 }) }}
+		{{ render.section({"type": "category", "category": category.slug, "num": 5000 }) }}
 	</section>
 {% endblock content %}
diff --git a/theme/templates/index.html b/theme/templates/index.html
index fc10cff3d41aad5701ca2fc6601ee7268da551b5..d4f2b290de95d8c0f5e42938e0348405c51773ec 100644
--- a/theme/templates/index.html
+++ b/theme/templates/index.html
@@ -1,93 +1,11 @@
 {% extends "base.html" %}
 {% block content_title %}{% endblock %}
 
-{%- macro render_section_news(s) -%}
-	<ul class="catcards">
-	{%- for article in all_articles -%}
-	{%- if loop.index < s.num -%}
-		{%- call(nativecat, sccat, _) category_by_name(article.category.name) -%}
-			<li style="--category-color: {{ sccat.color }}"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
-		{%- endcall -%}
-	{%- endif -%}
-	{%- endfor -%}
-	</ul>
-{%- endmacro -%}
-
-{%- macro render_section_custom(s) -%}
-	<ul class="catcards">
-	{%- for c in s.content -%}
-	<li style="--category-color: {{ c.color }}"><a href="{{ c.url }}">{{ c[lang]|e }}</a></li>
-	{%- endfor -%}
-	</ul>
-{%- endmacro -%}
-
-{%- macro render_section_iframe(s) -%}
-	<iframe src="{{ s.url }}"></iframe>
-{%- endmacro -%}
-
-{%- macro render_section_category(s) -%}
-	{%- call(nativecat, sccat, catarticles) category_by_name(s.category) -%}
-	{%- if s.title is not defined -%}
-		<header>
-			<h2 {% if s.id is defined -%}id="{{ s.id }}"{%- endif %}>{{ sccat[lang]|e }}</h2>
-		</header>
-	{%- endif -%}
-	<ul class="catcards">
-	{%- for article in catarticles -%}
-	{%- if loop.index < s.num -%}
-		<li style="--category-color: {{ sccat.color }}"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
-	{%- endif -%}
-	{%- endfor -%}
-	</ul>
-	{%- endcall -%}
-{%- endmacro -%}
-
-{%- macro render_section_tag(s) -%}
-	{%- call(nativetag, tagarticles) tag_by_name(s.tag) -%}
-	{%- if s.title is not defined -%}
-		<header>
-			<h2 {% if s.id is defined -%}id="{{ s.id }}"{%- endif %}>{{ s.tag|e }}</h2>
-		</header>
-	{%- endif -%}
-	<ul class="catcards">
-	{%- for article in tagarticles -%}
-	{%- if loop.index < s.num -%}
-		{%- call(nativecat, sccat, _) category_by_name(article.category.name) -%}
-			<li style="--category-color: {{ sccat.color }}"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
-		{%- endcall -%}
-	{%- endif -%}
-	{%- endfor -%}
-	</ul>
-	{%- endcall -%}
-{%- endmacro -%}
-
-{%- macro render_section(s) -%}
-	{%- if s.title is defined -%}
-		<header>
-			<h2 {% if s.id is defined -%}id="{{ s.id }}"{%- endif %}>{{ s.title[lang]|e }}</h2>
-		</header>
-	{%- endif -%}
-	{%- if s.type == "news" -%}
-		{{ render_section_news(s) }}
-	{%- elif s.type == "iframe" -%}
-		{{ render_section_iframe(s) }}
-	{%- elif s.type == "custom" -%}
-		{{ render_section_custom(s) }}
-	{%- elif s.type == "category" -%}
-		{{ render_section_category(s) }}
-	{%- elif s.type == "tag" -%}
-		{{ render_section_tag(s) }}
-	{%- else -%}
-	<br />
-	<strong>ERROR: render_section: Unknown section type: {{ s.type|e }}</strong><br />
-	<br />
-	{%- endif -%}
-{%- endmacro -%}
 
 {% block content %}
 {%- for s in sc.startpage -%}
 	<section>
-		{{ render_section(s) }}
+		{{ render.section(s) }}
 	</section>
 {%- endfor -%}
 {% endblock content %}
diff --git a/theme/templates/tag.html b/theme/templates/tag.html
index 551bb5b0c6f3b183213dcaed3f50ff760e2cc40c..c71333e130168e511d437b7f729c75211c755e1c 100644
--- a/theme/templates/tag.html
+++ b/theme/templates/tag.html
@@ -1,7 +1,7 @@
-{% extends "index.html" %}
+{% extends "base.html" %}
 {% block title %}{{ l[lang].title_prefix }}{{ l[lang].sitename }}{{ l[lang].title_suffix }} - {{ tag }}{%endblock%}
 {% block content %}
 	<section>
-		{{ render_section({"type": "tag", "tag": tag.slug, "num": 5000 }) }}
+		{{ render.section({"type": "tag", "tag": tag.slug, "num": 5000 }) }}
 	</section>
 {% endblock content %}