diff --git a/theme/templates/macros/link.html b/theme/templates/macros/link.html
index a5defe9aca01950b7a899f6d636cc930c147c43a..c4b2157cf48bc81fa557f29914ad33a6aaa5ba33 100644
--- a/theme/templates/macros/link.html
+++ b/theme/templates/macros/link.html
@@ -65,8 +65,8 @@
 						{%- set ns.anchor = anchor -%}
 						{%- set ns.reflang = reflang -%}
 						{%- set ns.is_external = is_external -%}
-						{%- set ns.reftype = reftype -%}
 						{%- if not is_external -%}
+							{%- set ns.reftype = reftype -%}
 							{%- set ns.refid = refid -%}
 							{%- set ns.refpage = refpage -%}
 							{%- set ns.tagcattitle = tagcattitle -%}