Difference between revisions of "Template:Recipe/doc"

From Project: Gorgon Wiki
Jump to: navigation, search
(Created page with "== Description == :Use this template whenever you want the recipe icon and link to display. == Syntax == :Type {{t|Item|Item name}} where you want the recipe icon and link to...")
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<includeonly>
 +
<!-- Categories/interwikis for the template itself -->
 +
[[Category:Formatting templates]]
 +
</includeonly><noinclude>
 +
<!-- Categories/interwikis for this documentation itself -->
 +
[[Category:Template documentation|{{PAGENAME}}]]
 +
</noinclude>
 +
 
== Description ==
 
== Description ==
:Use this template whenever you want the recipe icon and link to display.
+
Takes the name of a recipe. as found in-game in the crafting menu or an NPC's training menu, or in the "Name" field in recipes.json (at [http://cdn.projectgorgon.com http://cdn.projectgorgon.com]) and outputs a link and sometimes an icon:
 +
* If the recipe produces an item, the template outputs that icon's icon and a link to the item page. Uses a helper template for each letter, e.g. [[Template:RecipeToItem/A]].
 +
* Otherwise the template outputs no icon and a link to a relevant page, usually the page of the skill-line, with a few exceptions (for example the apply augment recipes link to Augmentation instead of Lore).
  
 
== Syntax ==
 
== Syntax ==
:Type {{t|Item|Item name}} where you want the recipe icon and link to display.
+
*<pre>{{Recipe|recipeName}}</pre>
 
+
*or, to omit the leading scroll icon and "Recipe:" text: <pre>{{Recipe|recipeName|noscroll}}</pre>
== Parameters ==
+
===Parameters===
; Item name
+
*First parameter (required): The exact name of the recipe.
: The correct capitalized name of the item.
+
*Second parameter (optional): If this parameter is present (can be any non-empty string), the leading scroll icon and "Recipe:" text are omitted.
  
== Sample output ==
+
== Example ==
{| class="wikitable"
+
===Example 1 Code ===
| Code
+
<pre>{{Recipe|Whisky (Drinkable Cask)}}</pre>
| {{=}}
+
===Example 1 Output ===
| Output
+
{{Recipe|Whisky (Drinkable Cask)}}
|-
+
===Example 2 Code ===
| {{tlc|Recipe|Basic Rennet}}
+
<pre>{{Recipe|Whisky (Drinkable Cask)|x}}</pre>
| &rArr;
+
===Example 2 Output ===
| {{Recipe|Basic Rennet}}
+
{{Recipe|Whisky (Drinkable Cask)|x}}
|}
 
  
 
== Note ==
 
== Note ==
: Uses the new [[Template:Item icon]] template.
+
An old version of this template was partially implemented at one time, attempting to redirect users to recipe pages as found in [[:Category:Recipes]]. However only a small fraction of these individual recipe pages were ever created, and that project was abandoned.
<includeonly>
 
<!-- Categories/interwikis for the template itself -->
 
[[Category:Formatting templates|Recipe]]
 
</includeonly><noinclude>
 
<!-- Categories/interwikis for this documentation itself -->
 
[[Category:Template documentation|{{PAGENAME}}]]
 
</noinclude>
 

Latest revision as of 19:36, 1 April 2021


Description

Takes the name of a recipe. as found in-game in the crafting menu or an NPC's training menu, or in the "Name" field in recipes.json (at http://cdn.projectgorgon.com) and outputs a link and sometimes an icon:

  • If the recipe produces an item, the template outputs that icon's icon and a link to the item page. Uses a helper template for each letter, e.g. Template:RecipeToItem/A.
  • Otherwise the template outputs no icon and a link to a relevant page, usually the page of the skill-line, with a few exceptions (for example the apply augment recipes link to Augmentation instead of Lore).

Syntax

  • {{Recipe|recipeName}}
  • or, to omit the leading scroll icon and "Recipe:" text:
    {{Recipe|recipeName|noscroll}}

Parameters

  • First parameter (required): The exact name of the recipe.
  • Second parameter (optional): If this parameter is present (can be any non-empty string), the leading scroll icon and "Recipe:" text are omitted.

Example

Example 1 Code

{{Recipe|Whisky (Drinkable Cask)}}

Example 1 Output

Error: Item not foundRecipe: icon_5722.png Whisky (Drinkable Cask)

Example 2 Code

{{Recipe|Whisky (Drinkable Cask)|x}}

Example 2 Output

icon_5722.png Whisky (Drinkable Cask)

Note

An old version of this template was partially implemented at one time, attempting to redirect users to recipe pages as found in Category:Recipes. However only a small fraction of these individual recipe pages were ever created, and that project was abandoned.