Template:Tiered Body Part Equipment Navbox: Difference between revisions
Jump to navigation
Jump to search
(new generic navbox generator) |
(tweak query to include black mote) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{Navbox | <includeonly>{{Navbox | ||
| name = {{{navboxname|Body Armor}}} Navbox | | name = {{{navboxname|Body Armor}}} Navbox | ||
| title = List of [[:Category:{{{category|Armor}}}|{{{navboxname|Body Armor}}}]] | | title = List of [[:Category:{{{category|Armor}}}|{{{navboxtitle|{{{navboxname|Body Armor}}}}}}]] | ||
| below = | | below = <div style="text-align:right;font-size:100%; font-weight:bold; font-family:Source Code Pro;"><span style="color:#155352;">see also:</span> {{#if:{{{seealso|}}}|{{{seealso}}} <span style="color:#155352;">-</span>}} [[Template:Armor_Navbox|full list of armor and shields]] <span style="color:#155352;">-</span> [[List_of_Body_Parts|equipment by body part]]</span></div> | ||
| listclass = hlist | | listclass = hlist | ||
| state = {{{state|collapsed}}} | | state = {{{state|collapsed}}} | ||
Line 14: | Line 14: | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=1 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=1 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group1style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list1style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group2 = Tier 2 | ||
| list2 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=2 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=2 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group2style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list2style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group3 = Tier 3 | ||
| list3 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=3 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=3 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group3style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list3style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group4 = Tier 4 | ||
| list4 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=4 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=4 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group4style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list4style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group5 = Tier 5 | ||
| list5 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=5 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=5 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group5style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list5style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group6 = Tier 6 | ||
| list6 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=6 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=6 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group6style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list6style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group7 = Tier 7 | ||
| list7 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)=7 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)=7 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group7style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list7style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| | | group8 = Tier 8 | ||
| list8 = {{#cargo_query: | |||
| | |||
| tables = ItemsTable=IT, GeneralData=GD | | tables = ItemsTable=IT, GeneralData=GD | ||
| join on = IT.ObjectID=GD.ObjectID | | join on = IT.ObjectID=GD.ObjectID | ||
| fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | | fields = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page | ||
| where = COALESCE(GD.Tier,1)>=8 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND | | where = COALESCE(GD.Tier,1)>=8 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield' | ||
| format = list | | format = list | ||
| order by = GD.PlainName | | order by = GD.PlainName | ||
| delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | | delimiter = <span style="color:#155352;">-</span> </span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span> | ||
| default = | |||
}} | }} | ||
| group8style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
| list8style = border-bottom:1px solid rgba(77,110,122,0.3);padding-bottom: 5px; | |||
}}</includeonly><noinclude>Generic template wrapper for a tiered body part equipment navbox for the specified body part. | }}</includeonly><noinclude>Generic template wrapper for a tiered body part equipment navbox for the specified body part. Excludes shields and bucklers from the navbox by default. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 118: | Line 128: | ||
|- | |- | ||
| navboxname | | navboxname | ||
| Name of the navbox | | Name of the navbox. Should match the navbox page name excluding the " Navbox" part at the end. For example, "Template:Body Armor Navbox" should have this set to "Body Armor". | ||
|- | |||
| navboxtitle | |||
| Optional. User-friendly navbox title. Defaults to navboxname if not specified. | |||
|- | |- | ||
| bodypart | | bodypart | ||
Line 125: | Line 138: | ||
| category | | category | ||
| The associated category to link to. For example, the Body Armor Navbox sets this to "Armor", which results in a link to [[:Category:Armor]]. | | The associated category to link to. For example, the Body Armor Navbox sets this to "Armor", which results in a link to [[:Category:Armor]]. | ||
|- | |||
| seealso | |||
| Optional. An additional link that should be pre-pended to the default list of "see also:" links. See [[Template:Floating Nearby Objects Navbox]] for an example of this in use. | |||
|} | |} | ||
== Example == | == Example: == | ||
{{{{ | <code><nowiki>{{Tiered Body Part Equipment Navbox|category=Head Equipment|bodypart=Head|navboxname=Head Equipment}}</nowiki></code> | ||
== Result: == | |||
{{Tiered Body Part Equipment Navbox|category=Head Equipment|bodypart=Head|navboxname=Head Equipment}} | |||
[[Category:Navigation]] | |||
</noinclude> | </noinclude> |
Latest revision as of 21:48, 22 December 2022
Generic template wrapper for a tiered body part equipment navbox for the specified body part. Excludes shields and bucklers from the navbox by default.
parameter | description |
---|---|
navboxname | Name of the navbox. Should match the navbox page name excluding the " Navbox" part at the end. For example, "Template:Body Armor Navbox" should have this set to "Body Armor". |
navboxtitle | Optional. User-friendly navbox title. Defaults to navboxname if not specified. |
bodypart | The body part that will be used for cargo queries, such as "Head" or "Body". |
category | The associated category to link to. For example, the Body Armor Navbox sets this to "Armor", which results in a link to Category:Armor. |
seealso | Optional. An additional link that should be pre-pended to the default list of "see also:" links. See Template:Floating Nearby Objects Navbox for an example of this in use. |
Example:
{{Tiered Body Part Equipment Navbox|category=Head Equipment|bodypart=Head|navboxname=Head Equipment}}
Result:
|