Difference between revisions of "Template:Search categories"
Dinoguy1000 (talk | contribs) (bypass redirects) |
Dinoguy1000 (talk | contribs) (cache each unlinked item so {{unlink}} only gets run once on the item (thus reducing the number of times it's run per transclusion by half); make everything not break when SMW breaks/is disabled) |
||
Line 2: | Line 2: | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Support]]s {{ #arraydefine: $search_array | {{{supports}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Support]]s {{ #arraydefine: $search_array | {{{supports}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Support::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{anti-supports<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{anti-supports}}} | No Entry }}}} | | }} }}{{ #if: {{{anti-supports<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{anti-supports}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Anti-support]]s {{ #arraydefine: $search_array | {{{anti-supports}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Anti-support]]s {{ #arraydefine: $search_array | {{{anti-supports}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Anti-support::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{archseries<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{archseries}}} | No Entry }}}} | | }} }}{{ #if: {{{archseries<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{archseries}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Archetype]]s and [[series]] {{ #arraydefine: $search_array | {{{archseries}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Archetype]]s and [[series]] {{ #arraydefine: $search_array | {{{archseries}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Archseries::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{supports_archetypes<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{supports_archetypes}}} | No Entry }}}} | | }} }}{{ #if: {{{supports_archetypes<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{supports_archetypes}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Support]]s [[archetype]]s {{ #arraydefine: $search_array | {{{supports_archetypes}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Support]]s [[archetype]]s {{ #arraydefine: $search_array | {{{supports_archetypes}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Archetype support::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{anti-supports_archetypes<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{anti-supports_archetypes}}} | No Entry }}}} | | }} }}{{ #if: {{{anti-supports_archetypes<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{anti-supports_archetypes}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Anti-support]]s [[archetype]]s {{ #arraydefine: $search_array | {{{anti-supports_archetypes}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Anti-support]]s [[archetype]]s {{ #arraydefine: $search_array | {{{anti-supports_archetypes}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Archetype anti-support::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{related_to_archseries<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{related_to_archseries}}} | No Entry }}}} | | }} }}{{ #if: {{{related_to_archseries<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{related_to_archseries}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Related to [[archetype]]s and [[series]] {{ #arraydefine: $search_array | {{{related_to_archseries}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Related to [[archetype]]s and [[series]] {{ #arraydefine: $search_array | {{{related_to_archseries}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Archseries related::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{counter<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{counter}}} | No Entry }}}} | | }} }}{{ #if: {{{counter<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{counter}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Counters {{ #arraydefine: $search_array | {{{counter}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Counters {{ #arraydefine: $search_array | {{{counter}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Counters::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{action<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{action}}} | No Entry }}}} | | }} }}{{ #if: {{{action<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{action}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Actions {{ #arraydefine: $search_array | {{{action}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Actions {{ #arraydefine: $search_array | {{{action}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Actions::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{stat_change<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{stat_change}}} | No Entry }}}} | | }} }}{{ #if: {{{stat_change<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{stat_change}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Stat changes {{ #arraydefine: $search_array | {{{stat_change}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Stat changes {{ #arraydefine: $search_array | {{{stat_change}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Stats::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{m/s/t<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{m/s/t}}} | No Entry }}}} | | }} }}{{ #if: {{{m/s/t<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{m/s/t}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Monster/Spell/Trap categories {{ #arraydefine: $search_array | {{{m/s/t}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Monster/Spell/Trap categories {{ #arraydefine: $search_array | {{{m/s/t}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[MonsterSpellTrap::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{summoning<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{summoning}}} | No Entry }}}} |<!-- this one needs work to support the auto-"Can be Special Summoned", etc. stuff --> | }} }}{{ #if: {{{summoning<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{summoning}}} | No Entry }}}} |<!-- this one needs work to support the auto-"Can be Special Summoned", etc. stuff --> | ||
<div class="hlist"> | <div class="hlist"> | ||
; Summoning categories {{ #arraydefine: $search_array | {{{summoning}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Summoning categories {{ #arraydefine: $search_array | {{{summoning}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Summoning::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{attack<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{attack}}} | No Entry }}}} | | }} }}{{ #if: {{{attack<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{attack}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Attack categories {{ #arraydefine: $search_array | {{{attack}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Attack categories {{ #arraydefine: $search_array | {{{attack}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Attack::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{banished<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{banished}}} | No Entry }}}} | | }} }}{{ #if: {{{banished<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{banished}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Banished categories {{ #arraydefine: $search_array | {{{banished}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Banished categories {{ #arraydefine: $search_array | {{{banished}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[RFP::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{life_points<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{life_points}}} | No Entry }}}} | | }} }}{{ #if: {{{life_points<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{life_points}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Life Points {{ #arraydefine: $search_array | {{{life_points}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Life Points {{ #arraydefine: $search_array | {{{life_points}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Life Points::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{fm_for<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{fm_for}}} | No Entry }}}} | | }} }}{{ #if: {{{fm_for<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{fm_for}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Fusion Material]] for {{ #arraydefine: $search_array | {{{fm_for}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Fusion Material]] for {{ #arraydefine: $search_array | {{{fm_for}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Fusion Material for::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{sm_for<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{sm_for}}} | No Entry }}}} | | }} }}{{ #if: {{{sm_for<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{sm_for}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; [[Synchro Material]] for {{ #arraydefine: $search_array | {{{sm_for}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; [[Synchro Material]] for {{ #arraydefine: $search_array | {{{sm_for}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Synchro Material for::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}{{ #if: {{{misc<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{misc}}} | No Entry }}}} | | }} }}{{ #if: {{{misc<includeonly>|</includeonly>}}} | {{ #if: {{not|{{ #pos: {{{misc}}} | No Entry }}}} | | ||
<div class="hlist"> | <div class="hlist"> | ||
; Miscellaneous {{ #arraydefine: $search_array | {{{misc}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ; Miscellaneous {{ #arraydefine: $search_array | {{{misc}}} | * | unique }}{{ #arrayprint: $search_array || $el | <nowiki/> | ||
− | : [[ | + | : [[{{ #vardefineecho: $uel | {{unlink|$el}} }}|{{ #explode: {{ #var: $uel }} | ( }}]][[Misc::{{ #var: $uel }}| ]] }} |
</div> | </div> | ||
}} }}<noinclude> | }} }}<noinclude> |
Revision as of 06:49, 30 December 2015
- Supports
- [[{{{supports}}}|{{{supports}}}]]
- Anti-supports
- [[{{{anti-supports}}}|{{{anti-supports}}}]]
- Archetypes and series
- [[{{{archseries}}}|{{{archseries}}}]]
- Supports archetypes
- [[{{{supports_archetypes}}}|{{{supports_archetypes}}}]]
- Anti-supports archetypes
- [[{{{anti-supports_archetypes}}}|{{{anti-supports_archetypes}}}]]
- Related to archetypes and series
- [[{{{related_to_archseries}}}|{{{related_to_archseries}}}]]
- Counters
- [[{{{counter}}}|{{{counter}}}]]
- Actions
- [[{{{action}}}|{{{action}}}]]
- Stat changes
- [[{{{stat_change}}}|{{{stat_change}}}]]
- Monster/Spell/Trap categories
- [[{{{m/s/t}}}|{{{m/s/t}}}]]
- Summoning categories
- [[{{{summoning}}}|{{{summoning}}}]]
- Attack categories
- [[{{{attack}}}|{{{attack}}}]]
- Banished categories
- [[{{{banished}}}|{{{banished}}}]]
- Life Points
- [[{{{life_points}}}|{{{life_points}}}]]
- Fusion Material for
- [[{{{fm_for}}}|{{{fm_for}}}]]
- Synchro Material for
- [[{{{sm_for}}}|{{{sm_for}}}]]
- Miscellaneous
- [[{{{misc}}}|{{{misc}}}]]
Copy paste the following to add this to a template:
{{ #if: {{{supports|}}}{{{anti-supports|}}}{{{archseries|}}}{{{supports_archetypes|}}}{{{anti-supports_archetypes|}}}{{{related_to_archseries|}}}{{{counter|}}}{{{action|}}}{{{stat_change|}}}{{{m/s/t|}}}{{{summoning|}}}{{{attack|}}}{{{banished|}}}{{{life_points|}}}{{{fm_for|}}}{{{sm_for|}}}{{{misc<includeonly>|</includeonly>}}} |   ==Search categories== {{Search categories | supports = {{{supports<includeonly>|</includeonly>}}} | anti-supports = {{{anti-supports<includeonly>|</includeonly>}}} | archseries = {{{archseries<includeonly>|</includeonly>}}} | supports_archetypes = {{{supports_archetypes<includeonly>|</includeonly>}}} | anti-supports_archetypes = {{{anti-supports_archetypes<includeonly>|</includeonly>}}} | related_to_archseries = {{{related_to_archseries<includeonly>|</includeonly>}}} | counter = {{{counter<includeonly>|</includeonly>}}} | action = {{{action<includeonly>|</includeonly>}}} | stat_change = {{{stat_change<includeonly>|</includeonly>}}} | m/s/t = {{{m/s/t<includeonly>|</includeonly>}}} | summoning = {{{summoning<includeonly>|</includeonly>}}} | attack = {{{attack<includeonly>|</includeonly>}}} | banished = {{{banished<includeonly>|</includeonly>}}} | life_points = {{{life_points<includeonly>|</includeonly>}}} | fm_for = {{{fm_for<includeonly>|</includeonly>}}} | sm_for = {{{sm_for<includeonly>|</includeonly>}}} | misc = {{{misc<includeonly>|</includeonly>}}} }} }}