Permanently protected template

Difference between revisions of "Template:Archseries navbox"

From Yugipedia
Jump to: navigation, search
(this breaks fantastically if the archseries name passed in is linked, so always unlink it)
(so I can (eventually) get a better idea of what uses the redirect)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{IfSemantics|{{ #vardefine: $asn-name | {{Normalized pagename|{{ #if: {{{1|}}} | {{Unlink|{{{1}}}}} | {{PAGENAME}} }}}}
+
{{ #vardefine: $tas-nav-name | {{ #if: {{{1|}}} | {{Unlink|{{{1}}}}} | {{Normalized pagename|{{PAGENAME}}}} }} }}<!--
}}{{ #vardefine: $asn-display-name | {{ #if: 1 | {{ #explode: {{ #var: $asn-name }} | ( }} }}
+
-->{{ #vardefine: $tas-medium-abbr | {{ #switch: {{{medium|}}}
}}{{ #vardefine: $asn-list-name | {{ #if: 1 | {{ #explode: {{ #explode: {{ #var: $asn-name }} | (archetype) }} | (series) }} }}
+
  | anime          = a
}}{{ #vardefine: $asn-support | {{ #ask: <q>[[Support::{{ #var: $asn-name }}]] OR [[Archetype support::{{ #var: $asn-name }}]]</q> }}
+
  | manga          = m
}}{{ #vardefine: $asn-anti-support | {{ #ask: <q>[[Anti-support::{{ #var: $asn-name }}]] OR [[Archetype anti-support::{{ #var: $asn-name }}]]</q> }}
+
  | Duel Links    = dl
}}{{ #vardefine: $asn-type | {{ #if: {{ #var: $asn-support }}{{ #var: $asn-anti-support }} | archetype | series }}
+
  | Rush Duel      = rd
}}{{ #vardefine: $asn-related | {{ #ask: [[Archseries related::{{ #var: $asn-name }}]] }}
+
  | D Team        = dtz
}}{{ #vardefine: $asn-quote | {{ #if: {{ #var: $asn-support}}{{ #var: $asn-anti-support }} | " }}
+
  | OCG Structures = ost
}}{{Navbox|{{ #if: {{{child|}}} | child }}
+
  | #default      = o
| title  = {{ #if: {{{name|}}} | {{{name}}} | {{ #var: $asn-quote }}[[:{{ #var: $asn-name }}|{{ #var: $asn-display-name }}]]{{ #var: $asn-quote }} }}{{ #if: {{Card name|{{ #var: $asn-name }}|ja}} | &emsp;<span lang="ja">{{ #if: {{ #var: $asn-quote }} | 「 }}{{Card name|{{ #var: $asn-name }}|ja}}{{ #if: {{ #var: $asn-quote }} | 」 }}</span> }}<span style="float: right; line-height: normal; font-variant: small-caps;"><span class="explain" style="font-variant: normal;" title="This {{ #var: $asn-type }} is featured in the OCG/TCG.">o</span> {{ #if: {{{member|}}} | <span class="explain" title="This card is a member of this {{ #var: $asn-type }}.">m</span> }} {{ #if: {{{support|}}} | <span class="explain" title="This card supports this archetype.">+</span> }} {{ #if: {{{anti-support|}}} | <span class="explain" title="This card anti-supports this archetype.">-</span> }} {{ #if: {{{related|}}} | <span class="explain" title="This card is related to this {{ #var: $asn-type }}.">r</span> }}</span>
+
  }}
 +
}}<!--
 +
-->{{ #vardefine: $tas-medium | {{ #switch: {{ #var: $tas-medium-abbr }}
 +
  | o  = the OCG/TCG
 +
  | a  = the anime
 +
  | m  = the manga
 +
  | dl  = Yu-Gi-Oh! Duel Links
 +
  | rd  = Yu-Gi-Oh! Rush Duel
 +
  | dtz = Yu-Gi-Oh! D Team ZEXAL
 +
  | ost = Yu-Gi-Oh! OCG Structures
 +
  }}
 +
}}<!--
 +
-->{{ #vardefine: $tas-medium-property | {{ #switch: {{ #var: $tas-medium-abbr }}
 +
  | o  = [[Concept:CG cards]]
 +
  | a  = [[Medium::Anime]]
 +
  | m  = [[Medium::Manga]]
 +
  | dl  = [[Release::Yu-Gi-Oh! Duel Links]]
 +
  | rd  = [[Medium::Rush Duel]]
 +
  | dtz = [[Category:Yu-Gi-Oh! D Team ZEXAL cards]]
 +
  | ost = [[Category:Yu-Gi-Oh! OCG Structures cards]]
 +
  }}
 +
}}<!--
 +
if this is a "card" page (marked as a member, (anti-)support, or related), check if it's a Duel Links Skill page
 +
so we can customize the "This _ is a member of this _", etc. messages later
 +
-->{{ #vardefine: $tas-page-type | {{ #if: {{{member|}}}{{{support|}}}{{{anti-support|}}}{{{related|}}}
 +
  | {{ #ifeq: {{{type}}} | Skill | Skill | card }}
 +
  }}
 +
}}<!--
 +
archseries name, as used in the names of its member/etc. lists
 +
-->{{ #vardefine: $tas-list-name | {{ #explode: {{ #explode: {{ #var: $tas-nav-name }} | (series) }} | (archetype) }} }}<!--
 +
-->{{ #vardefine: $tas-support | {{ #ifexpr: {{ #ask: [[Archetype support::{{ #var: $tas-nav-name }}]] {{ #var: $tas-medium-property }} | format=count }} > 0 | 1 }} }}<!--
 +
-->{{ #vardefine: $tas-anti-support | {{ #ifexpr: {{ #ask: [[Archetype anti-support::{{ #var: $tas-nav-name }}]] {{ #var: $tas-medium-property }} | format=count }} > 0 | 1 }} }}<!--
 +
-->{{ #vardefine: $tas-related | {{ #ifexpr: {{ #ask: [[Archseries related::{{ #var: $tas-nav-name }}]] {{ #var: $tas-medium-property }} | format=count }} > 0 | 1 }} }}<!--
 +
-->{{ #vardefine: $tas-type | {{ #if: {{ #var: $tas-support }}{{ #var: $tas-anti-support }} | archetype | series }} }}<!--
 +
-->{{ #vardefine: $tas-ja-name | {{Name|{{ #var: $tas-nav-name }}|ja}} }}<!--
 +
-->{{ #vardefine: $tas-quotes | {{ #ifeq: {{ #var: $tas-type }} | archetype | " }} }}<!--
 +
-->{{ #vardefine: $tas-link-template | {{ #if: {{ #show: {{ #var: $tas-nav-name }} |?Cut from card names }} | Archseries navbox/cut link | Link with quotes }} }}<!--
 +
-->{{Navbox|{{ #if: {{{child|}}} | child }}
 +
| title  = {{ #if: {{{name|}}} | {{{name}}} | {{ #var: $tas-quotes }}[[:{{ #var: $tas-nav-name }}|{{trim|{{ #explode: {{ #var: $tas-nav-name }} | ( }}}}]]{{ #var: $tas-quotes }} }}{{ #if: {{ #var: $tas-ja-name }} | &emsp;<span lang="ja">{{ #if: {{ #var: $tas-quotes }} | 「 }}{{ #var: $tas-ja-name }}{{ #if: {{ #var: $tas-quotes }} | 」 }}</span> }}<span style="float: right; line-height: normal; font-variant: small-caps;"><span class="explain" style="font-variant: normal;" title="This {{ #var: $tas-type }} is featured in {{ #var: $tas-medium }}.">{{ #var: $tas-medium-abbr }}</span> {{ #if: {{{member|}}} | <span class="explain" title="This {{ #var: $tas-page-type }} is a member of this {{ #var: $tas-type }}.">m</span> }} {{ #if: {{{support|}}} | <span class="explain" title="This {{ #var: $tas-page-type }} supports this archetype.">+</span> }} {{ #if: {{{anti-support|}}} | <span class="explain" title="This {{ #var: $tas-page-type }} anti-supports this archetype.">-</span> }} {{ #if: {{{related|}}} | <span class="explain" title="This {{ #var: $tas-page-type }} is related to this {{ #var: $tas-type }}.">r</span> }}</span>
 
| state  = <includeonly>{{ #if: {{{state|}}} | {{{state}}} | autocollapse }}</includeonly>
 
| state  = <includeonly>{{ #if: {{{state|}}} | {{{state}}} | autocollapse }}</includeonly>
 
| navbar  = plain
 
| navbar  = plain
 
| listclass = hlist
 
| listclass = hlist
 
+
| group1  = [[List of "{{ #var: $tas-list-name }}" cards|Members]]
| group1  = '''[[List of "{{ #var: $asn-list-name }}" cards|Members]]'''
+
| list1  = {{ #ask: [[Archseries::{{ #var: $tas-nav-name }}]] {{ #var: $tas-medium-property }} |?English name |format=ul |link=none |template={{ #var: $tas-link-template }} |userparam={{ #replace: {{ #var: $tas-list-name }} | - | %- }} |limit=60 }}
| list1  = {{ #ask: [[Concept:CG monsters]] [[Archseries::{{ #var: $asn-name }}]] |?English name |format=ul |template=NavboxList |link=none |limit=100 }}
+
| group2  = [[List of "{{ #var: $tas-list-name }}" support cards|Support]]
 
+
| list2  = {{ #if: {{ #var: $tas-support }} | {{ #ask: [[Archetype support::{{ #var: $tas-nav-name }}]] [[Page type::Card page]] {{ #var: $tas-medium-property }} |?English name |format=ul |link=none |template=Link with quotes |limit=60 }} }}
{{ #ask: [[Concept:CG spells and traps]] [[Archseries::{{ #var: $asn-name }}]] |?English name |format=ul |template=NavboxList |link=none }}
+
| group3  = [[List of "{{ #var: $tas-list-name }}" anti-support cards|Anti-support]]
 
+
| list3  = {{ #if: {{ #var: $tas-anti-support }} | {{ #ask: [[Archetype anti-support::{{ #var: $tas-nav-name }}]] [[Page type::Card page]] {{ #var: $tas-medium-property }} |?English name |format=ul |link=none |template=Link with quotes |limit=60 }} }}
| group2  = '''[[List of "{{ #var: $asn-list-name }}" support cards|Support]]'''
+
| group4  = Related
| list2  = {{ #if: {{ #var: $asn-support }} | {{ #ask: [[Concept:CG monsters]] <q>[[Support::{{ #var: $asn-name }}]] OR [[Archetype support::{{ #var: $asn-name }}]]</q> |?English name |format=ul |template=NavboxList |link=none }}
+
| list4  = {{ #if: {{ #var: $tas-related }} | {{ #ask: [[Archseries related::{{ #var: $tas-nav-name }}]] [[Page type::Card page]] {{ #var: $tas-medium-property }} |?English name |format=ul |link=none |template=Link with quotes |limit=60 }} }}
 
+
| group5 = Related Skills
{{ #ask: [[Concept:CG spells and traps]] <q>[[Support::{{ #var: $asn-name }}]] OR [[Archetype support::{{ #var: $asn-name }}]]</q> |?English name |format=ul |template=NavboxList |link=none }} }}
+
| list5   = {{ #ifeq: {{ #var: $tas-medium-abbr }} | dl | {{ #ask: <q>[[Archetype support::{{ #var: $tas-nav-name }}]] OR [[Archetype anti-support::{{ #var: $tas-nav-name }}]] OR [[Archseries related::{{ #var: $tas-nav-name }}]]</q> [[Page type::Skill page]] {{ #var: $tas-medium-property }} |?English name |format=ul |link=none |template=Link with quotes |limit=60 }} }}
 
+
}}<noinclude>
| group3  = '''[[List of "{{ #var: $asn-list-name }}" anti-support cards|Anti-support]]'''
+
{{Documentation}}
| list3  = {{ #if: {{ #var: $asn-anti-support }} | {{ #ask: [[Concept:CG monsters]] <q>[[Anti-support::{{ #var: $asn-name }}]] OR [[Archetype anti-support::{{ #var: $asn-name }}]]</q> |?English name |format=ul |template=NavboxList |link=none }}
+
</noinclude>
 
 
{{ #ask: [[Concept:CG spells and traps]] <q>[[Anti-support::{{ #var: $asn-name }}]] OR [[Archetype anti-support::{{ #var: $asn-name }}]]</q> |?English name |format=ul |template=NavboxList |link=none }} }}
 
 
 
| group4 = '''Related'''
 
| list4   = {{ #if: {{ #var: $asn-related }} | {{ #ask: [[Concept:CG monsters]] [[Archseries related::{{ #var: $asn-name }}]] |?English name |format=ul |template=NavboxList |link=none }}
 
 
 
{{ #ask: [[Concept:CG spells and traps]] [[Archseries related::{{ #var: $asn-name }}]] |?English name |format=ul |template=NavboxList |link=none }} }}
 
}}
 
|<noinclude>{{SMW notice}}</noinclude>}}<noinclude>[[Category:Navboxes]]</noinclude>
 

Latest revision as of 11:41, 15 December 2023