Jump to content

Template:Recipe: Difference between revisions

From Hearthsail
Rezept-Tabelle
 
Rezept als HTML-Tabelle: die bedingten Zeilen sassen falsch
 
Line 1: Line 1:
<includeonly>{| class="wikitable"
<includeonly><table class="wikitable hs-recipe"><tr><th colspan="2">{{{name|{{PAGENAME}}}}}</th></tr><tr><th>Crafted at</th><td>{{{station|Hand}}}</td></tr><tr><th>Ingredients</th><td>{{{ingredients|}}}</td></tr><tr><th>Makes</th><td>{{{yield|1}}}</td></tr>{{#if:{{{time|}}}|<tr><th>Takes</th><td>{{{time}}}</td></tr>}}{{#if:{{{unlock|}}}|<tr><th>Unlocked by</th><td>{{{unlock}}}</td></tr>}}</table></includeonly><noinclude>
! colspan="2" | {{{name|{{PAGENAME}}}}}
|-
! Crafted at
| {{{station|Hand}}}
|-
! Ingredients
| {{{ingredients|}}}
|-
! Makes
| {{{yield|1}}}
{{#if:{{{time|}}}|{{!}}-
! Takes
{{!}} {{{time}}}
}}{{#if:{{{unlock|}}}|{{!}}-
! Unlocked by
{{!}} {{{unlock}}}
}}
|}</includeonly><noinclude>
A crafting recipe as a small table. Put it under the item's description.
A crafting recipe as a small table. Put it under the item's description.


Line 30: Line 12:
}}
}}
</pre>
</pre>
Built from HTML rows rather than wikitable syntax: with <code>{{!}}</code> the
optional rows end up in the wrong cells.


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 12:34, 31 July 2026

A crafting recipe as a small table. Put it under the item's description.

{{Recipe
| name        = Oak Plank
| station     = [[Workbench]]
| ingredients = {{Icon|Oak Log}} ×2
| yield       = 4
| time        = 2s
| unlock      = Available from the start
}}

Built from HTML rows rather than wikitable syntax: with | the optional rows end up in the wrong cells.