Difference between revisions of "Template:Has Variant"

From Pathfinder Wiki
 
Line 12: Line 12:
 
:{{Has Variant|page=AY Honors/Cycling - Advanced}}
 
:{{Has Variant|page=AY Honors/Cycling - Advanced}}
  
As shown above, the output format is just the title of the page (if it exists) or en empty string.  If you want a link, you need to supply that brackets.  If you want to supress the "AY Honors" part when you display the link, you can use #titleparts to extract the honor name from the output of the template.
+
As shown above, the output format is just the title of the page (if it exists) or en empty string.  If you want a link, you need to supply that brackets.  If you want to suppress the "AY Honors" part when you display the link, you can use #titleparts to extract the honor name from the output of the template.
  
 
{{#vardefine:gcCycle|{{Has Variant|page=AY Honors/Cycling - Advanced|division=General Conference}}}}
 
{{#vardefine:gcCycle|{{Has Variant|page=AY Honors/Cycling - Advanced|division=General Conference}}}}

Latest revision as of 04:51, 26 February 2021

Returns page title of division variant if it exists. Returns an empty string otherwise.

page
Title of page we want to check for a variant. If not specified, the template assumes it is being invoked from an honor landing page and uses that as the basis for the variant check. Variants are located at [[AY Honors/honor (division)]].
division
If specified, the template will use the value assigned as the division when it looks for a page. If not specified, it defaults to "General Conference".


Example

{{Has Variant|page=AY Honors/Cycling - Advanced}}

AY Honors/Cycling - Advanced (General Conference)


As shown above, the output format is just the title of the page (if it exists) or en empty string. If you want a link, you need to supply that brackets. If you want to suppress the "AY Honors" part when you display the link, you can use #titleparts to extract the honor name from the output of the template.


AY Honor Cycling - Advanced has a GC variant at AY Honor Cycling - Advanced.


AY Honor Biosafety has a SAD variant at AY Honor Biosafety.