{#- TODO lang irgendwie vernünftig setzen/erkennen -#} {%- if lang is not defined -%} {%- set lang = DEFAULT_LANG -%} {%- else -%} 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 article_by_slug(slug, lang) -%} {%- for a in 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 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 -%}
{% block head %}