Difference between revisions of "Template:ShowVariants"

From Pathfinder Wiki
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{{#vardefine:page|{{#titleparts:{{{page|{{PAGENAME}}}}}|2}}}}
+
{{#vardefine:page|{{{page|{{PAGENAME}}}}}}}
 
{{#vardefine:isvariant|{{IsVariant|page={{#var:page}}|text=This version of the honor is a variant of}}}}
 
{{#vardefine:isvariant|{{IsVariant|page={{#var:page}}|text=This version of the honor is a variant of}}}}
 +
{{#vardefine:listvariants|{{ListVariants|page={{#var:page}}|text=There is another version of this honor at}}}}
 
{{#if:{{#var:isvariant}}|{{#var:isvariant}}|
 
{{#if:{{#var:isvariant}}|{{#var:isvariant}}|
{{#if:{{ListVariants|page={{#var:page}}}}|There is another version of this honor at [[{{ListVariants|page={{#var:page}}}}]]}}}}
+
{{#if:{{#varlistvariants}}|{{#var:listvariants}}}}}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
This template detects variants of this honor indicated by '''page'''.  If '''page''' is not supplied, it assumes the invoking page is an honor.
 
This template detects variants of this honor indicated by '''page'''.  If '''page''' is not supplied, it assumes the invoking page is an honor.
  
{{ShowVariants|page=AY Honors/Archery}}
+
{|border=1
 
+
!page
{{ShowVariants|page=AY Honors/Archery (General Conference)}}
+
!result
 
+
|-
 +
|AY Honors/Archery
 +
|{{ShowVariants|page=AY Honors/Archery}}
 +
|-
 +
|AY Honors/Archery (General Conference)
 +
|{{ShowVariants|page=AY Honors/Archery (General Conference)}}
 +
|}
 
</noinclude>
 
</noinclude>

Revision as of 02:21, 27 February 2021

This template detects variants of this honor indicated by page. If page is not supplied, it assumes the invoking page is an honor.

page result
AY Honors/Archery


There is another version of this honor at AY Honor Archery

AY Honors/Archery (General Conference)


This version of the honor is a variant of AY Honor Archery