Template:Tiered Body Part Equipment Navbox: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
No edit summary
(tweak query to include black mote)
 
(9 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      = <hr><div style="text-align:right;font-size:100%; font-weight:bold; font-family:Source Code Pro;"><span style="color:#155352;">see also:</span> [[Template:Armor_Navbox|full list of armor and shields]] <span style="color:#155352;">-</span> [[List_of_Body_Parts|equipment by body part]]</span><hr>
| 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 Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list2 = <hr>
| group2 = Tier 2
 
| list2 = {{#cargo_query:
| group3 = Tier 2
| 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)=2 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list4 = <hr>
| group3 = Tier 3
 
| list3 = {{#cargo_query:
| group5 = Tier 3
| 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)=3 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list6 = <hr>
| group4 = Tier 4
 
| list4 = {{#cargo_query:
| group7 = Tier 4
| 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)=4 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list8 = <hr>
| group5 = Tier 5
 
| list5 = {{#cargo_query:
| group9 = Tier 5
| list9 = {{#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 Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list10 = <hr>
| group6 = Tier 6
 
| list6 = {{#cargo_query:
| group11 = Tier 6
| list11 = {{#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 Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list12 = <hr>
| group7 = Tier 7
 
| list7 = {{#cargo_query:
| group13 = Tier 7
| list13 = {{#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 Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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;


| list14 = <hr>
| group8 = Tier 8
 
| list8 = {{#cargo_query:
| group15 = Tier 8
| list15 = {{#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 Weight <> ''
   | 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 = &nbsp;<span style="color:#155352;">-</span>&nbsp;</span><span style="display:inline-block">|intro=<span style="display:inline-block">|outro=</span>
   | delimiter = &nbsp;<span style="color:#155352;">-</span>&nbsp;</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 for end-user display. Should match the page name minus "Navbox", for example set this to "Body Armor" if the page name is "Template:Body Armor 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.
|}
|}


Line 133: Line 149:


{{Tiered Body Part Equipment Navbox|category=Head Equipment|bodypart=Head|navboxname=Head Equipment}}
{{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: