Template:Craft Recipe List Header: Difference between revisions

From HorizonXI Wiki
No edit summary
(hide rank item row in legend if there is no rank item)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>
<includeonly><onlyinclude><div style="margin: 2em;">
:{|  
{{Crafting TOC|{{{name}}}}}
|-
{| style="border: 1px solid #aaa; padding: 4px;"
| class="{{{rank item css}}}" style="padding: 8px; width: 50px;" | Text
|- {{#if:{{{rank item css|}}}||style="display: none;"}}
| : Guild Rank Test item
| class="{{{rank item css}}}" style="padding: 8px; width: 50px; text-align: center" | Text
| style="background-color: transparent; padding-left: 8px;" | Guild Rank Test item <small class="{{{main craft css}}}" style="border: 1px solid #aaa; padding: 4px; border-radius: 4px; margin-left: 1em">[[:{{FULLPAGENAME}}#guild-rank-test-item|click to locate]]</small>
|-  
|-  
| class="{{{main craft css}}}" style="padding: 8px; width: 50px;" | Text
| class="{{{main craft css}}}" style="padding: 8px; width: 50px; text-align: center" | Text
| : item with {{{name}}} as its main craft
| style="background-color: transparent; padding-left: 8px;" | Item with {{{name}}} as its main craft
|-  
|-  
| class="{{{sub craft css}}}" style="padding: 8px; width: 50px;" | Text
| class="{{{sub craft css}}}" style="padding: 8px; width: 50px; text-align: center" | Text
| style="background-color: transparent" | : item with {{{name}}} as a subcraft
| style="background-color: transparent; padding-left: 8px;" | Item with {{{name}}} as a subcraft
|}</onlyinclude></includeonly>
|}</div></onlyinclude></includeonly>
==Usage==
==Usage==


Line 16: Line 17:


'''Note:''' ''This shows only the legend, will NOT affect the table formatting''.  
'''Note:''' ''This shows only the legend, will NOT affect the table formatting''.  
Parameters
*'''name''': name of the craft
*'''main craft css''': css class which styles the table cells associated with this craft being the main craft
*'''sub craft css''': css class which styles the table cells associated with this craft being a sub craft
*'''rank item css''': css class which styles the table cell of the rank item. ''Note:'' If rank item css is left blank, the row will not be displayed (e.g. for level 90+ recipe lists when there is no rank item).


===Examples===
===Examples===
Line 21: Line 28:
<pre>
<pre>
{{Craft Recipe List Header
{{Craft Recipe List Header
|name=Woodworking
| name = Woodworking
|rank item css=text-bold
| rank item css = text-bold
|main craft css=woodworking-body
| main craft css = woodworking-body
|sub craft css=woodworking-body-alt
| sub craft css = woodworking-body-alt
}}
}}
</pre>
</pre>
{{Craft Recipe List Header
{{Craft Recipe List Header
|name=Woodworking
| name = Woodworking
|rank item css=text-bold
| rank item css = text-bold
|main craft css=woodworking-body
| main craft css = woodworking-body
|sub craft css=woodworking-body-alt
| sub craft css = woodworking-body-alt
}}
}}

Latest revision as of 13:04, 26 December 2023

Usage

A template that generates the header information for the list of crafting recipes. See, e.g., Category:Woodworking/Amateur.

Note: This shows only the legend, will NOT affect the table formatting.

Parameters

  • name: name of the craft
  • main craft css: css class which styles the table cells associated with this craft being the main craft
  • sub craft css: css class which styles the table cells associated with this craft being a sub craft
  • rank item css: css class which styles the table cell of the rank item. Note: If rank item css is left blank, the row will not be displayed (e.g. for level 90+ recipe lists when there is no rank item).

Examples

{{Craft Recipe List Header
| name = Woodworking
| rank item css = text-bold
| main craft css = woodworking-body
| sub craft css = woodworking-body-alt
}}
Text Guild Rank Test item click to locate
Text Item with Woodworking as its main craft
Text Item with Woodworking as a subcraft