Difference between revisions of "Template:Rl"

m
(usage information / unknown recipe option / namespace-dependent categorization)
Line 1: Line 1:
{{#switch:{{lc:{{{1|}}}}}
+
<includeonly>{{#switch:{{lc:{{{1|}}}}}
 
| none | = ''None''
 
| none | = ''None''
 +
| ? | ?? | ??? | Unknown = {{#ifeq:{{NAMESPACE}}||{{Information Needed}}|{{Information Needed|nc}}}}
 
| #default = {{#if:{{{3|}}}|<!--
 
| #default = {{#if:{{{3|}}}|<!--
 
--><sup>{{Guild Icon|{{{2}}}}}<!--
 
--><sup>{{Guild Icon|{{{2}}}}}<!--
 
-->{{#ifeq:{{padleft:{{{3}}}|3|?}}|???|<!--
 
-->{{#ifeq:{{padleft:{{{3}}}|3|?}}|???|<!--
-->[[Category:Information Needed]]??|<!--
+
-->{{#ifeq:{{NAMESPACE}}||[[Category:Information Needed]]}}??|<!--
 
-->{{padleft:{{{3}}}|2|0}}<!--
 
-->{{padleft:{{{3}}}|2|0}}<!--
 
-->}}</sup><!--
 
-->}}</sup><!--
Line 11: Line 12:
 
--><sup> {{Guild Icon|{{{4}}}}}<!--
 
--><sup> {{Guild Icon|{{{4}}}}}<!--
 
-->{{#ifeq:{{padleft:{{{5}}}|3|?}}|???|<!--
 
-->{{#ifeq:{{padleft:{{{5}}}|3|?}}|???|<!--
-->[[Category:Information Needed]]??|<!--
+
-->{{#ifeq:{{NAMESPACE}}||[[Category:Information Needed]]}}??|<!--
 
-->{{padleft:{{{5}}}|2|0}}<!--
 
-->{{padleft:{{{5}}}|2|0}}<!--
 
-->}}</sup><!--
 
-->}}</sup><!--
Line 18: Line 19:
 
--><sup> {{Guild Icon|{{{6}}}}}<!--
 
--><sup> {{Guild Icon|{{{6}}}}}<!--
 
-->{{#ifeq:{{padleft:{{{7}}}|3|?}}|???|<!--
 
-->{{#ifeq:{{padleft:{{{7}}}|3|?}}|???|<!--
-->[[Category:Information Needed]]??|<!--
+
-->{{#ifeq:{{NAMESPACE}}||[[Category:Information Needed]]}}??|<!--
 
-->{{padleft:{{{7}}}|2|0}}<!--
 
-->{{padleft:{{{7}}}|2|0}}<!--
 
-->}}</sup><!--
 
-->}}</sup><!--
Line 25: Line 26:
 
--><sup> {{Guild Icon|{{{8}}}}}<!--
 
--><sup> {{Guild Icon|{{{8}}}}}<!--
 
-->{{#switch:{{padleft:{{{9}}}|3|?}}|???|<!--
 
-->{{#switch:{{padleft:{{{9}}}|3|?}}|???|<!--
-->[[Category:Information Needed]]??|<!--
+
-->{{#ifeq:{{NAMESPACE}}||[[Category:Information Needed]]}}??|<!--
 
-->{{padleft:{{{9}}}|2|0}}<!--
 
-->{{padleft:{{{9}}}|2|0}}<!--
 
-->}}</sup><!--
 
-->}}</sup><!--
Line 31: Line 32:
 
-->}}}}}}}}<!--
 
-->}}}}}}}}<!--
 
--> [[{{{1}}}]]<!--
 
--> [[{{{1}}}]]<!--
-->}}
+
-->}}</includeonly><noinclude>
 +
[[Category:Templates|{{PAGENAME}}]]
 +
==Usage==
 +
<pre>
 +
{{rl|<item>|<craft>|<cap>|<subcraft>|<subcraft cap>|<subcraft 2>|<subcraft 2 cap>}}
 +
</pre>
 +
This template was created to help format the recipe links in the "Used in Recipes" and "Obtained from Desynthesis" sections of item pages, but can be used anywhere that requires quick links to items and their recipe skill levels. It provides a link to the item specified and guild icons representing the crafts. The guild icons are clickable links to the craft pages. If "?", "??", or "???" is given as a skill cap, the page will automatically be categorized in the [[:Category:Information Needed|Information Needed]] category, but only if the page is in the [[mw:Help:Namespaces|Main namespace]] (e.g. it is a regular article and not a template, talk, or user page).
 +
===Examples===
 +
{|border="1"
 +
|- BGCOLOR="e3e3e3"
 +
! Code !! Result
 +
|-
 +
|<pre>{{rl|Potion|Alchemy|40}}</pre>
 +
| {{rl|Potion|Alchemy|40}}
 +
|-
 +
|<pre>{{rl|Sickle|Smithing|5|Woodworking|2}}</pre>
 +
| {{rl|Sickle|Smithing|5|Woodworking|2}}
 +
|-
 +
|<pre>{{rl|Brigandine|Leathercraft|57|Goldsmithing|50|Clothcraft|48}}</pre>
 +
| {{rl|Brigandine|Leathercraft|57|Goldsmithing|50|Clothcraft|48}}
 +
|-
 +
|<pre>{{rl|Brigandine|Leathercraft|57|Goldsmithing|50|Clothcraft|48}}</pre>
 +
| {{rl|Brigandine|Leathercraft|57|Goldsmithing|50|Clothcraft|48}}
 +
|-
 +
|<pre>{{rl|Iron Arrow|Woodworking|27|Smithing|??}}</pre>
 +
|{{rl|Iron Arrow|Woodworking|27|Smithing|??}}
 +
|-
 +
|<pre>{{rl|Gold Thread|Clothcraft|???}}</pre>
 +
|{{rl|Gold Thread|Clothcraft|???}}
 +
|-
 +
|<pre>{{rl|None}}</pre>
 +
|{{rl|None}}
 +
|-
 +
|<pre>{{rl|???}}</pre>
 +
| {{rl|???}}
 +
|-
 +
|<pre>{{rl|Unknown}}</pre>
 +
| {{rl|Unknown}}
 +
|-
 +
|<pre>
 +
*{{rl|Gelatin|Bonecraft|13}}
 +
*{{rl|Hard-Boiled Egg|Cooking|6}}
 +
*{{rl|Bretzel|Cooking|51}}
 +
*{{rl|Bast Parchment|Woodworking|45|Alchemy|29}}
 +
</pre>
 +
|
 +
*{{rl|Gelatin|Bonecraft|13}}
 +
*{{rl|Hard-Boiled Egg|Cooking|6}}
 +
*{{rl|Bretzel|Cooking|51}}
 +
*{{rl|Bast Parchment|Woodworking|45|Alchemy|29}}
 +
|}
 +
</noinclude>

Revision as of 16:41, 8 August 2015

Usage

{{rl|<item>|<craft>|<cap>|<subcraft>|<subcraft cap>|<subcraft 2>|<subcraft 2 cap>}}

This template was created to help format the recipe links in the "Used in Recipes" and "Obtained from Desynthesis" sections of item pages, but can be used anywhere that requires quick links to items and their recipe skill levels. It provides a link to the item specified and guild icons representing the crafts. The guild icons are clickable links to the craft pages. If "?", "??", or "???" is given as a skill cap, the page will automatically be categorized in the Information Needed category, but only if the page is in the Main namespace (e.g. it is a regular article and not a template, talk, or user page).

Examples

Code Result
{{rl|Potion|Alchemy|40}}
Alchemy 40 Potion
{{rl|Sickle|Smithing|5|Woodworking|2}}
Smithing 05 Woodworking 02 Sickle
{{rl|Brigandine|Leathercraft|57|Goldsmithing|50|Clothcraft|48}}
Leathercraft 57 Goldsmithing 50 Clothcraft 48 Brigandine
{{rl|Brigandine|Leathercraft|57|Goldsmithing|50|Clothcraft|48}}
Leathercraft 57 Goldsmithing 50 Clothcraft 48 Brigandine
{{rl|Iron Arrow|Woodworking|27|Smithing|??}}
Woodworking 27 Smithing ?? Iron Arrow
{{rl|Gold Thread|Clothcraft|???}}
Clothcraft ?? Gold Thread
{{rl|None}}
None
{{rl|???}}
Information Needed
{{rl|Unknown}}
Unknown
*{{rl|Gelatin|Bonecraft|13}}
*{{rl|Hard-Boiled Egg|Cooking|6}}
*{{rl|Bretzel|Cooking|51}} 
*{{rl|Bast Parchment|Woodworking|45|Alchemy|29}}