{% macro place_dl(place, label="", iso_code_prefix="") %} {% if place %} {% if label %}
{{label}}
{% endif %}
{{place.name}} {% if place.iso_code%}({% if iso_code_prefix %}{{iso_code_prefix}}-{% endif %}{{place.iso_code}}){% endif %}
{% endif %} {% endmacro place_dl %} {% macro dig_link(extra, name) %} {{ extra.base_url }}/dig/{{ name | trim_end_matches(pat=".") | urlencode_strict | replace(from="%2e", to=".") | safe }} {% endmacro dig_link %} {% macro dig(extra, name, fqdn=false, prefix="") %} {% if prefix %}{{ prefix }} {% endif %}{% if fqdn or name=="." %}{{ name }}{% else %}{{ name | trim_end_matches(pat=".") }}{% endif %} {% endmacro dig %} {% macro ip(extra, ip) %} {{ ip }} {% endmacro dig %} {% macro breadcrumb_domain(extra, name) %} {% set_global dot = "" %} {% set crumbs = name | split(pat=".") %} {% set_global i = 0 %} {% for crumb in crumbs %} {{-dot}}{{crumb}} {%- set_global dot = "." -%} {%- set_global i = i+1 -%} {% endfor %} {% endmacro breadcrumb_domain %}