Changes

Jump to navigation Jump to search
doc sortkey parameter
Line 1: Line 1: −
This template displays a table of the sell prices of an item for each requested item.  Each sell price is shown with the image icon and a superimposed quality star (see [[Template:Quality]]).  It intentionally does not show the money icon as to not clutter the page with multiple icons.
+
[[Template:Qualityprice|Qualityprice]] displays a table of the sell prices for a requested item for all item qualities.  Each sell price is shown with the image icon and a superimposed quality star (see [[Template:Quality]]).  It intentionally does not show the money icon so as to not clutter the page with multiple icons.
    
In order for the values to be calculated correctly, the input value should always be the item base cost.  If other factors should be included (e.g., professions that increase the price), those factors should be specified using the <tt>prof_mult</tt> parameter.
 
In order for the values to be calculated correctly, the input value should always be the item base cost.  If other factors should be included (e.g., professions that increase the price), those factors should be specified using the <tt>prof_mult</tt> parameter.
Line 25: Line 25:  
  <nowiki>{{</nowiki>[[Template:Qualityprice|Qualityprice]] |''item_name''| ''base_cost'' | prof_mult=''mult'' | quality=''values''
 
  <nowiki>{{</nowiki>[[Template:Qualityprice|Qualityprice]] |''item_name''| ''base_cost'' | prof_mult=''mult'' | quality=''values''
 
                 | srcprice=''price'' | auto=true
 
                 | srcprice=''price'' | auto=true
                 | iridium=true | hide=''values'' | size=''px'' | link=''link'' | alt=''alt'' <nowiki>}}</nowiki>
+
                 | iridium=true | hide=''values'' | size=''px'' | link=''link'' | alt=''alt'' | sortkey=''value'' <nowiki>}}</nowiki>
    
===Parameters===
 
===Parameters===
Line 87: Line 87:  
** This is not normally directly displayed on the page, but may be used by screen readers or accessibility-aware browsers.
 
** This is not normally directly displayed on the page, but may be used by screen readers or accessibility-aware browsers.
 
** Setting alt to an empty value (<tt>|alt=|</tt>) disables the alt text.
 
** Setting alt to an empty value (<tt>|alt=|</tt>) disables the alt text.
 +
 +
* '''sortkey=''value'''''
 +
** Override the value used for the sortkey.  Default value is <tt>true</tt>, in which case the sortkey is set to the normal quality value (or to 0 for non-numeric data)
 +
** This parameter should not normally be necessary.  One known use case, however, is when one table cell makes multiple calls to Qualityprice, in which case only one of the calls should be allowed to set a sortkey. Therefore, the sortkey should be set to an empty value on all but the first template call in a single cell.
    
===Examples===
 
===Examples===

Navigation menu