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>
|
||||
<ul class="list">
|
||||
{# 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)) %}
|
||||
target="_blank"
|
||||
{% endif %}
|
||||
|
@ -119,12 +119,12 @@
|
|||
{%- endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% 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 %}
|
||||
{% endif %}
|
||||
|
||||
{% 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 %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue