Template:Icon Base/Doc
From Starfield Wiki
Summary
This template serves as a base template for many of the icon templates found on the site. To create a template that uses this is a base, use the following pattern for your template:
<includeonly>{{#inherit:ns_base}}{{Icon Base |before={{{before|}}} |name={{#switch:{{NS_PARENT}} |namespace1=value1 |namespace2=value2 |... |#default=defaultvalue}} |size={{{size|##px}}} |class={{{class|}}} |link={{{link}}} |caption={{{caption|}}} |after={{{after|}}} }}</includeonly><noinclude>{{/Doc}}</noinclude>
You can fill in as many of these with hard values as needed. Unless there's good reason to disallow access to certain parameters, however, all other values should be included as above so that the entire family of templates will work the same.
Parameters[edit]
Parameter | Scope | Description |
---|---|---|
before | optional | Text to place before the icon. A non-breaking space will be included between the text and the icon. |
name | required | The name of the icon without the File: in front of it.
|
size | optional | The size of the icon to display. This should be left at the default size in most cases. (Default: {{{defaultsize}}}px) |
class | optional | The class to use for the image. This can be used to alter how the image is displayed, for example between mobile and desktop displays. |
link | optional | Page to link to if the image is clicked on. (Default: the File page for the icon) |
caption | optional | Hover text to display when the image is hovered over. |
after | optional | Text to display after the icon. A non-breaking space will be included between the text and the icon. |