Rename link_target macro to get_target
This commit is contained in:
parent
2455759bd8
commit
f0e999a68a
1 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,7 @@
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
{# Open links in new window depending on the LINKS_IN_NEW_TAB setting #}
|
{# Open links in new window depending on the LINKS_IN_NEW_TAB setting #}
|
||||||
{% macro link_target(link) -%}
|
{% macro get_target(link) -%}
|
||||||
{% if LINKS_IN_NEW_TAB not in ('no', 'none', false, 0, 'external') or (LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL)) %}
|
{% if LINKS_IN_NEW_TAB not in ('no', 'none', false, 0, 'external') or (LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL)) %}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -119,12 +119,12 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if DISPLAY_PAGES_ON_MENU %}
|
{% if DISPLAY_PAGES_ON_MENU %}
|
||||||
{% for page in pages %}
|
{% for page in pages %}
|
||||||
<li><a {{ link_target(SITEURL) }} href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
|
<li><a {{ get_target(SITEURL) }} href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for name, link in LINKS %}
|
{% for name, link in LINKS %}
|
||||||
<li><a {{ link_target(link) }} href="{{ link }}" >{{ name }}</a></li>
|
<li><a {{ get_target(link) }} href="{{ link }}" >{{ name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue