Vorlage:Infobox: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(sync with english template) |
(new infosection params) |
||
Zeile 110: | Zeile 110: | ||
}}}}<!-- | }}}}<!-- | ||
+ | }}}}<!-- | ||
+ | |||
+ | // custom_price if defined provides entire text of all price-related sections | ||
+ | -->{{#if:{{{custom_price|}}} | ||
+ | |{{{custom_price}}} | ||
// Display all item prices: Base price plus all professions listed in {{{profession}}} | // Display all item prices: Base price plus all professions listed in {{{profession}}} | ||
// Subtemplate automatically decides how to handle multiple columns, etc. | // Subtemplate automatically decides how to handle multiple columns, etc. | ||
− | -->{{Infosection price | + | --> |{{Infosection price |
− | + | | prof = Base {{#if:{{{profession|}}} |, {{{profession|}}}}} | |
− | + | | item = {{{eng|{{{name|{{{PAGENAME}}}}}}}}} | |
− | + | | link = {{{name|{{{PAGENAME}}}}}} | |
− | + | | price = {{{sellprice|}}} | |
− | + | | quality = {{#arrayprint:$quality}} | |
− | }}<!-- | + | }}<!-- |
// Add display of products and their prices. | // Add display of products and their prices. | ||
− | // | + | // artisan_item is new parameter, that eventually should be able to move alot of the single-item-case data |
// onto the individual article pags. | // onto the individual article pags. | ||
− | // If | + | // If artisan_item provided, use it to generate the infosection. Otherwise, fallback to old-style manual switch |
− | -->{{#if:{{{ | + | --> {{#if:{{{artisan_item|}}} |
− | + | | {{Infosection price | |
− | + | | item = {{{artisan_item}}} | |
− | + | | prof = {{#if:{{{artisan_prof|}}}| {{{artisan_prof}}} | Base,Artisan}} | |
− | + | | artisan = true | |
− | + | | link = {{{artisan_alt|}}} | |
− | + | | price = {{{artisan_price|0}}} | |
− | + | | quality = {{{artisan_qual|}}} | |
− | + | | srcprice = {{{sellprice|}}} | |
− | + | | auto = true | |
+ | }}<-- | ||
− | // Manually define various | + | // Manually define various artisan_item sections |
// One key reason to move these details onto the individual infobox pages is for sake of translation -- so that language-specific | // One key reason to move these details onto the individual infobox pages is for sake of translation -- so that language-specific | ||
− | // translations of | + | // translations of item can be provided outside of template namespace. |
// (Infosection price will recognize some key item names, such as Wine, Juice, Jelly, Pickles, but doing more than that is insane) | // (Infosection price will recognize some key item names, such as Wine, Juice, Jelly, Pickles, but doing more than that is insane) | ||
--> | --> | ||
− | + | | {{#switch:{{lc:{{{type|{{{eng|{{{name|{{PAGENAME}}}}}}}}}}}}} | |
− | |sunflower = {{Infosection price| | + | |sunflower = {{Infosection price|prof=base |artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Oil |price=100 |quality=normal}} |
− | |hops = {{Infosection price| | + | |hops = {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Pale Ale,Pickles |price=300}} |
− | |wheat = {{Infosection price| | + | |wheat = {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Beer,Pickles |price=200}} |
− | |honey = {{Infosection price| | + | |honey = {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Mead |price=200 |iridium=true}} |
− | |corn = {{Infosection price| | + | |corn = {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Juice,Pickles,Oil|price=100 |quality=normal}} |
− | |tea leaves={{Infosection price| | + | |tea leaves= {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Green Tea,Pickles|price=100 |quality=normal}} |
|fruit | |fruit | ||
− | |fruits = {{Infosection price| | + | |fruits = {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Wine,Jelly |price=0 |iridium=true}} |
|vegetables | |vegetables | ||
− | |vegetable = {{Infosection price| | + | |vegetable = {{Infosection price|prof=base,artisan|artisan=true|auto=true|srcprice={{{sellprice|}}}|item=Juice,Pickles |price=0 |iridium=true}} |
− | |truffle = {{Infosection price| | + | |truffle = {{Infosection price|prof=base,artisan|artisan=true|item=Truffle Oil |price=1065|quality=normal}} |
− | |milk = {{Infosection price| | + | |milk = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Cheese |price=230|iridium=true}} |
− | |large milk= {{Infosection price| | + | |large milk= {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Cheese |price=230|quality=gold,iridium}} |
− | |goat milk = {{Infosection price| | + | |goat milk = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Goat Cheese |price=400|iridium=true}} |
− | |large goat milk = {{Infosection price| | + | |large goat milk = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Goat Cheese |price=400|quality=gold,iridium}} |
− | |wool = {{Infosection price| | + | |wool = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Cloth |price=470|quality=normal}} |
− | |duck egg = {{Infosection price| | + | |duck egg = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Duck Mayonnaise |price=375|quality=normal}} |
− | |egg = {{Infosection price| | + | |egg = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Mayonnaise |price=190|quality=normal}} |
− | |dinosaur egg= {{Infosection price| | + | |dinosaur egg= {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Dinosaur Mayonnaise |price=800|quality=normal}} |
− | |large egg = {{Infosection price| | + | |large egg = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Mayonnaise |price=190|quality=gold}} |
− | |void | + | |void egg = {{Infosection price|prof=base,rancher,artisan|artisan=true|item=Void Mayonnaise |price=275|quality=normal}}<!-- |
// Add artisan sections to generic item pages. Again, shouldn't be necessary any more once profession is added to original article | // Add artisan sections to generic item pages. Again, shouldn't be necessary any more once profession is added to original article | ||
--> | --> | ||
|wine | |wine | ||
− | |juice = {{#if:{{{profession|}}}||{{Infosection price| | + | |juice = {{#if:{{{profession|}}}||{{Infosection price|prof=artisan|item={{{name|{{{{PAGENAME}}}}}}}|price={{{sellprice|}}}|quality=normal}}}} |
− | |aged roe = {{#if:{{{profession|}}}||{{Infosection price| | + | |aged roe = {{#if:{{{profession|}}}||{{Infosection price|prof=artisan|item={{{name|{{{{PAGENAME}}}}}}}|price={{{sellprice|}}}|quality=normal}}}} |
}}}}}}{{#if:{{{ingredients|}}}|<nowiki/> | }}}}}}{{#if:{{{ingredients|}}}|<nowiki/> | ||
{{!}}- | {{!}}- |
Version vom 10. September 2020, 04:31 Uhr
Details zur Vorlage finden Sie auf der englischsprachigen Dokumentationsseite.
Verwendung
Diese Vorlage kann verwendet werden, indem Sie auf eine relevante Seite folgendes eingeben.
{{Infobox}}
Ergibt...
Infobox | |
Information Vorlage:Infosection price |
Fehler: Die Parser-Funktion {{#seo:}} muss zu mindestens einem Meta-Element einen Wert enthalten.