From fc05942499132ee214fb7c827383787c145d4338 Mon Sep 17 00:00:00 2001 From: Fidel Ramos Date: Wed, 30 Oct 2019 23:13:38 +0000 Subject: [PATCH] Refactor get_target to return just the target value --- templates/base.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/base.html b/templates/base.html index 59ff847..1669f05 100644 --- a/templates/base.html +++ b/templates/base.html @@ -110,7 +110,9 @@ {# Open links in new window depending on the LINKS_IN_NEW_TAB setting #} {% 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" + _blank + {% else %} + _self {% endif %} {% endmacro %} @@ -119,12 +121,12 @@ {%- endif %} {% if DISPLAY_PAGES_ON_MENU %} {% for page in pages %} -
  • {{ page.title }}
  • +
  • {{ page.title }}
  • {% endfor %} {% endif %} {% for name, link in LINKS %} -
  • {{ name }}
  • +
  • {{ name }}
  • {% endfor %}