Changes

Jump to navigation Jump to search
721 bytes added ,  19:11, 24 September 2020
Updated parameters
Line 8: Line 8:  
}}
 
}}
   −
This template displays a generic infobox for a wide variety of items.  Note that several categories of item have customized variants of the generic infobox; see [[:Category:Infobox templates]] for a complete listing.
+
The [[Template:Infobox|Infobox]] template displays a generic infobox for a wide variety of items.  Note that several categories of item have customized variants of the generic infobox; see [[:Category:Infobox templates]] for a complete listing.
    
==Notes==
 
==Notes==
Line 16: Line 16:     
==Usage==
 
==Usage==
  −
The ''image2 - image4'' parameters can be used to display more than one image file. For example,[[File:Egg.png|32px]][[File:Brown_Egg.png|32px]] ([[Egg]] and [[Egg|Brown Egg]]).
  −
  −
This template will automatically populate some links from plain text. Source and season will automatically scan for associate articles and make links if they exist.
  −
   
===Syntax===
 
===Syntax===
 
   <nowiki>{{</nowiki>[[Template:Infobox|Infobox]]
 
   <nowiki>{{</nowiki>[[Template:Infobox|Infobox]]
Line 51: Line 46:  
     |fishingxp      = Details of XP
 
     |fishingxp      = Details of XP
 
     |tingredients    = ingredients with the Trapper profession
 
     |tingredients    = ingredients with the Trapper profession
     |artisanitem     = Name(s) of item(s) derived from primary item by processing
+
     |price_ncols     = to change whether non-artisan prices are displayed horizontally or vertically
     |artisanprofession = Professions that affect prices of artisanitems
+
    |artisan_item    = Name(s) of item(s) derived from primary item by processing
     |alt_artisanitem = Language-specific eqivalents for artisanitems
+
     |artisan_prof    = Professions that affect prices of artisan_item
     |artisanprice    = Base price of artisanitems
+
     |artisan_link    = Language-specific eqivalents for artisan_item
     |artisanquality  = Qualities of artisanitems
+
     |artisan_price  = Base price of artisan_item
 +
     |artisan_qual    = Qualities of artisan_item
 +
    |artisan_ncols  = to change whether non-artisan prices are displayed horizontally or vertically
 +
    |custom_price    = to override entire price section with customized output from [[Template:Infosection price|Infosection price]]
 
   <nowiki>}}</nowiki>
 
   <nowiki>}}</nowiki>
   Line 67: Line 65:  
** Name of image(s) to display in infobox. Default is <tt>page_name</tt>.png
 
** Name of image(s) to display in infobox. Default is <tt>page_name</tt>.png
 
*** On non-English wikis, default value is <tt>eng</tt>.png
 
*** On non-English wikis, default value is <tt>eng</tt>.png
** If more than one image should be displayed, multiple image names can be provided, separated by commas
+
** If more than one image should be displayed, multiple image names can be provided, separated by commas. For example, use <tt>image=Egg, Brown Egg</tt> to display [[File:Egg.png|32px]][[File:Brown_Egg.png|32px]].
 
** The image names should include the extension (.jpg, .gif, etc) if the images are not in .png format; otherwise the extension is optional and .png will automatically be appended
 
** The image names should include the extension (.jpg, .gif, etc) if the images are not in .png format; otherwise the extension is optional and .png will automatically be appended
   Line 159: Line 157:     
* '''fishingxp = ''values'''''
 
* '''fishingxp = ''values'''''
* See [[Green Algae]] for example of usage
+
** See [[Green Algae]] for example of usage
 +
 
 +
* '''price_ncols = ''ncols'''''
 +
** Set to 1 to force standard (non-artisan) prices to be displayed vertically, in all right-hand column; set to 2 or 3 to force prices to be displayed horizontally.
   −
* '''artisanitem = ''values''''' and all other '''artisan*****''' parameters
+
* '''artisan_item = ''values''''' and all other '''artisan_*****''' parameters
** If artisanitem is set, a second grid of prices will be displayed showing prices for items derived/created from the primary item.
+
** If artisan_item is set, a second grid of prices will be displayed showing prices for items derived/created from the primary item.
** <tt>artisanitem</tt> should be a comma separated list of the names of derived/crafted/artisan items to be included in the price grid
+
** <tt>artisan_item</tt> should be a comma separated list of the names of derived/crafted/artisan items to be included in the price grid
 
** The variables are all passed to [[Template:Infosection price]], which generates the actual price grid, using <tt>artisan=true</tt>.  For complete documentaton of the parameter meanings see Infosection price. The parameters recognized by Infobox, and the equivalent parameters in Infosection price, are:
 
** The variables are all passed to [[Template:Infosection price]], which generates the actual price grid, using <tt>artisan=true</tt>.  For complete documentaton of the parameter meanings see Infosection price. The parameters recognized by Infobox, and the equivalent parameters in Infosection price, are:
*** artisanitem -> sellitem
+
*** artisan_item -> item
*** alt_artisanitem -> alt_sellitem
+
*** artisan_link -> link
*** artisanprice -> sellprice
+
*** artisan_price -> price
*** artisanprofession -> profession
+
*** artisan_prof -> prof
*** artisanimage -> sellimage
+
*** artisan_qual -> quality
*** artisanquality -> quality
+
*** artisan_ncols -> ncolumns
*** artisanoneitempercol -> oneitempercol
+
 
*** artisancolumns -> ncolumns
+
* '''custom_price = ''template'''''
*** sellprice -> sourceprice
+
** If custom_price is set, it provides the entire content of the price section of the infobox (both standard prices and artisan prices).
 +
** Typically custom_price is assigned one or more template calls to [[Template:Infosection price]], which handles the word of generating the content.
 +
** For an example, see [[Salmonberry]].
 +
** This allows all the parameters/functionality of Infosection price to be used to create fully customized price sections, for items that have non-standard needs.
    
===Examples===
 
===Examples===

Navigation menu