Template:ASearch: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
(Trying to make the source column into a link)
(Testing a fix for apostrophes in material/symbol when matching against altname)
Tag: Reverted
Line 1: Line 1:
<includeonly>
<includeonly>{{#ask: {{#switch:{{{t|}}}|i=[[page type is::item]]|w=[[page type is::weapon]]|s=[[page type is::shield]]|a=[[page type is::armor]]|#default=}}[[uses symbol::{{#if:{{{1|}}}|{{#arraymap:{{{1}}}|+|@@@@|@@@@|{{!}}{{!}}}}|{{PAGENAME}}}}]]{{!}}{{!}}[[uses material::{{#if:{{{1|}}}|{{#arraymap:{{lc:{{{1}}}}}|+|@@@@|@@@@|{{!}}{{!}}}}|{{lc:{{PAGENAME}}}}}}]]|format=table|mainlabel=Item| ?Page source is=Source is|sep=,&nbsp;| ?Rarity is|default=None yet|limit=10}}{{#if:{{{2|}}}|[[needs updating::true| ]]}}</includeonly><noinclude>This template is used to list the items that have a [[Property:Uses material]] or [[Property:Uses symbol]] matching that of the the page's name. If a variable is added, it will use that instead of the page name. If two or three variables are added (using + as the separator), it will search for all pages with either. Setting "t=" will allow you to specify a specific item type, "i" (items), "w" (weapons), "a" (armor), "s" (shields).{{cat|Templates,Search Templates}}</noinclude>
{{#ask:
{{#switch:{{{t|}}}
|i=[[page type is::item]]
|w=[[page type is::weapon]]
|s=[[page type is::shield]]
|a=[[page type is::armor]]
|#default=
}}
[[uses symbol::{{#if:{{{1|}}}
|{{#arraymap:{{{1}}}|+|@@@@|"@@@@"|{{!}}{{!}}}}
|{{PAGENAME}}
}}]]
{{!}}{{!}}
[[uses material::{{#if:{{{1|}}}
|{{#arraymap:{{lc:{{{1}}}}}|+|@@@@|"@@@@"|{{!}}{{!}}}}
|{{lc:{{PAGENAME}}}}
}}]]
|format=table
|mainlabel=Item
|?Page source is=Source is
|sep=,&nbsp;
|?Rarity is
|default=None yet
|limit=10
}}
{{#if:{{{2|}}}|[[needs updating::true| ]]}}
</includeonly><noinclude>
This template is used to list the items that have a [[Property:Uses material]] or [[Property:Uses symbol]] matching that of the page's name. If a variable is added, it will use that instead of the page name. If two or three variables are added (using + as the separator), it will search for all pages with either. Setting "t=" will allow you to specify a specific item type, "i" (items), "w" (weapons), "a" (armor), "s" (shields).
{{cat|Templates,Search Templates}}
</noinclude>

Revision as of 09:50, 31 May 2025

This template is used to list the items that have a Property:Uses material or Property:Uses symbol matching that of the page's name. If a variable is added, it will use that instead of the page name. If two or three variables are added (using + as the separator), it will search for all pages with either. Setting "t=" will allow you to specify a specific item type, "i" (items), "w" (weapons), "a" (armor), "s" (shields).