From: Philipp Spitzer Date: Sun, 3 Jul 2022 21:44:05 +0000 (+0200) Subject: If a gastronomy has a link without text, put the link below the name. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/534055b646e1de5753b311fdc92fd97271f7b89a If a gastronomy has a link without text, put the link below the name. --- diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index f4c5450..ca88e96 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -65,9 +65,14 @@ * '''Hütten''': {{ gastronomy_description }} {%- for info in gastronomy %} ** {% set space = joiner(" ") %} - {%- if info.name %}{{ space() }}{{ info.name }}{% endif %} + {%- if info.name %}{{ space() }} + {%- if info.weblink and not info.weblink.text %}{{ weblink({"url": info.weblink.url, "text": info.name}) }} + {%- else %}{{ info.name }} + {%- endif %} + {%- endif %} {%- if info.wr_page %}{{ space() }}{{ wr_page(info.wr_page) }}{% endif %} - {%- if info.weblink %}{{ space() }}{{ weblink(info.weblink) }}{% endif %} + {%- if info.weblink and not (info.name and not info.weblink.text) %} + {{- space() }}{{ weblink(info.weblink) }}{% endif %} {%- if info.note %}{{ space() }}({{ info.note }}){% endif %} {%- endfor %} * '''Andere Rodelbahnen''':