Editing
Template:Version/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} {{Subpage other|<!-- do not categorise -->|{{Accessibility dispute |reason=version information conveyed by background color has no text alternative |talk=Color coding accessibility |date=November 2016}}}} {{Uses TemplateStyles|Template:Version/styles.css}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> == Usage == This template presents version history tables in a standardized format. Many articles on Wikipedia use color-coded tables to illustrate the version or release history of software. The template has been imported from German Wikipedia, where it is used as the current standard for color-coding history tables. This template is used within [[Help:Wikitable|Wikitables]], making use of the [[Help:Table#Pipe syntax tutorial|pipe syntax]]. Legends can be added flexbox or tables. As colors are not visible to blind or visually-impaired readers, this template uses replacement information when necessary to improve accessibility, e.g. using the "title" attribute. (See [[Wikipedia:WikiProject Accessibility]].) When creating a version history, please note that less is more: [[WP:NOTCHANGELOG|Wikipedia is not a directory or changelog]]. Only important or major releases should be documented in Wikipedia. See the [[Wikipedia:Manual of Style/Computing|Manual of Style for Computing topics]] for further guidelines. === General look === {| class="wikitable" ! Version ! Year ! Description |- | {{Version |o |1.0}} | {{#expr: {{CURRENTYEAR}}-3}} | Old versions that no longer receive updates |- | {{Version |co |2.0}} | {{#expr: {{CURRENTYEAR}}-2}} | Old versions that still receive updates |- | {{Version |c |3.0}} | {{#expr: {{CURRENTYEAR}}-1}} | Latest version |- | {{Version |cp |4.0beta2}} | {{#expr: {{CURRENTYEAR}}}} | Latest preview version |- | {{Version |p |4.0}} | {{#expr: {{CURRENTYEAR}}+1}} | Future version |- | colspan=3 | {{Version|l|show=111111}} |} === When to avoid === ;Discontinued products: For a product that is neither supported nor developed, each version would have the "EOL versions" description. Since no distinction would exist between version stages, the use of this template would lack any basis. A simple sentence or a {{para|discontinued|yes}} in the infobox would do admirably well. == Parameters == === Legend box === {| class="wikitable" |- ! Parameter ! Description ! Notes |- | <code>1</code> | Legend type | Either of the following generates a legend box. Acceptable values include: :'''l''': Horizontal legend :'''lv''': Vertical legend :'''t''': Horizontal legend, as a table :'''tv''': Vertical legend, as a table |- | <code>show</code> | Legend contents | This parameter is optional. By default the legend box contains the following six items: # '''Legend:''' (appears bold when the legend type is either "l", "lv", or "t") # Old version, not maintained # Old version, still maintained # '''Current version''' (appears bold) # Latest preview version # Future version This parameter allows each item to be displayed or hidden with digits. Each digit controls the state of its associated item in the above list.<br /> Acceptable digits are "1" (displays the associated legend item) and "0" (hides the associated legend item).<br /> The parameter is "show=XXX" where "XXX" is: * a six-digit number when the legend type is either "l" or "lv" * a five-digit number when the legend type is either "t" or "tv" because the first item ("Legend:") cannot be hidden. Additional digits on the '''left''' are ignored. |- | <code>style</code> | [[Cascading Style Sheets|CSS]] styles | This parameter is optional. Use it to change the template's formatting, style and layout via CSS syntax. In combination with the legend the specified CSS applies to the entire block. |} === Table cells === {| class="wikitable" |- ! Parameter ! Description ! Notes |- | <code>1</code> | Data type | Either of the following change the background color of the cell in which it is inserted: :'''o''': Denotes old version that is not maintained :'''co''': Denotes old version that is maintained :'''c''': Denotes latest stable version :'''cp''': Denotes latest preview version :'''p''': Denotes planned future version |- | <code>2</code> | Text | Specifies the text to display on screen, usually a version number or name of a specific version. |- | <code>style</code> | [[Cascading Style Sheets|CSS]] styles | This parameter is optional. Use it to change the template's formatting, style and layout via CSS syntax. This parameter can be inserted into a table cell to enforce CSS definitions in that cell. |- | <code>sortKey</code>{{anchor|sortKey}} | Sorting key | This parameter is optional. A sortkey is an invisible string used to change the way a certain table cell is sorted. For instance, normally, the phrase "ACME's Bow" is sorted with phrases that start with A. Affixing a sortkey of "Bow" to the phrase causes the phrase to be sorted with other phrases that start with "B" (or, to be more accurate, with "Bow"). For general information on sorting tables, see [[Help:Tables#Sorting|Help:Tables]]. |} == Examples == {{See|Template:Version/Examples|Template:Version/doc/Examples from german Wikipedia}} === Legend box === {| class="wikitable" style="width:100%;" |- ! Description ! What you type ! What it looks like |- | Horizontal legend | <syntaxhighlight lang="wikitext">{{Version |l |show=110111}}</syntaxhighlight> | {{Version |l |show=110111}} |- | Vertical legend | <syntaxhighlight lang="wikitext">{{Version |lv |show=011101}}</syntaxhighlight> | {{Version |lv |show=011101}} |- | Horizontal legend table | <syntaxhighlight lang="wikitext">{{Version |t |show=11110}}</syntaxhighlight> | {{Version |t |show=11110}} |- | Vertical legend table | <syntaxhighlight lang="wikitext">{{Version |tv |show=01111}}</syntaxhighlight> | {{Version |tv |show=01111}} |} === Table cells === {| class="wikitable" |- ! Description ! What you type ! What it looks like |- | [[end-of-life (product)|EOL]] versions | <syntaxhighlight lang="wikitext">{{Version |o |1.0}}</syntaxhighlight> | {{Version |o |1.0}} |- | [[long-term support|LTS]] versions | <syntaxhighlight lang="wikitext">{{Version |co |2.0}}</syntaxhighlight> | {{Version |co |2.0}} |- | Latest stable version | <syntaxhighlight lang="wikitext">{{Version |c |3.0}}</syntaxhighlight> | {{Version |c |3.0}} |- | Preview version | <syntaxhighlight lang="wikitext">{{Version |cp |4.0}}</syntaxhighlight> | {{Version |cp |4.0}} |- | Planned future version | <syntaxhighlight lang="wikitext">{{Version |p |5.0}}</syntaxhighlight> | {{Version |p |5.0}} |} === Sortable tables === The template can be used in sortable tables. If the column ''version'' is sortable, the [[#sortKey|sort key]] defaults to the value of the version parameter. If you need differing sorting, add the ''sortKey'' parameter as follows: {| class="wikitable" |- ! What you type!!What it looks like |- | <syntaxhighlight lang="wikitext">{| class="wikitable sortable" |- ! Version !! Date !! Description |- | {{Version |o |1.0 |sortKey=1.0}} | 2010-07-23 || [[end-of-life (product)|EOL]] versions |- | {{Version |co |2.0 |sortKey=2.0}} | 2011-06-27 || [[long-term support|LTS]] versions |- | {{Version |cp |3.0 DP |sortKey=3.0 A}} | 2012-03-02 || Developer's preview |- | {{Version |cp |3.0 CP |sortKey=3.0 B}} | 2012-04-01 || Consumers Preview |- | {{Version |cp |3.0 RC |sortKey=3.0 C}} | 2012-05-25 || Release candidate |- | {{Version |c |3.0 |sortKey=3.0 Z}} | 2012-06-23 || Release to web |- | {{Version |p |4.0 |sortKey=4.0}} | 2017-09-06 || Future version |}</syntaxhighlight>|| {| class="wikitable sortable" |- ! Version !! Date !! Description |- | {{Version |o |1.0 |sortKey=1.0}} | 2010-07-23 || [[end-of-life (product)|EOL]] versions |- | {{Version |co |2.0 |sortKey=2.0}} | 2011-06-27 || [[long-term support|LTS]] versions |- | {{Version |cp |3.0 DP |sortKey=3.0 A}} | 2012-03-02 || Developer's preview |- | {{Version |cp |3.0 CP |sortKey=3.0 B}} | 2012-04-01 || Consumers Preview |- | {{Version |cp |3.0 RC |sortKey=3.0 C}} | 2012-05-25 || Release candidate |- | {{Version |c |3.0 |sortKey=3.0 Z}} | 2012-06-23 || Release to web |- | {{Version |p |4.0 |sortKey=4.0}} | 2017-09-06 || Future version |} |} == TemplateData == {{TemplateDataHeader}} <templatedata> { "params": { "1": { "label": "Type", "description": "For a table cell, this is \"o\", \"co\", \"c\", \"cp\", or \"p\", meaning old unmaintained version, old maintained version, current, preview, and future version respectively. To create a table legend instead, use \"l\", \"lv\", \"t\", or \"tv\", meaning horizontal or vertical legend, or horizontal or vertical legend as a table, respectively.", "example": "c", "type": "string", "required": true }, "2": { "label": "Text (for cells)", "description": "If this is a cell (see parameter 1), this is required. It is the text to display.", "example": "1.0-alpha", "type": "content", "autovalue": "", "suggested": true }, "style": { "label": "Custom CSS", "description": "Custom CSS to apply to the template", "example": "text-align: center;" }, "show": { "label": "Legend components shown", "description": " If this is a legend, a series of ones (on) and zeros (off) denoting the components of the legend in the order: Legend; EOL versions; LTS versions; Current version; Latest preview version; Future release. If displaying as a table, the text \"Legend\" must be shown and so the first digit should be omitted.", "example": "110110", "type": "string", "default": "All parts displayed. (111111)", "suggested": true }, "sortKey": { "label": "Sort key (for cells)", "description": "When the cells of a table are sorted, this cell would normally be positioned by the visible cell content. If you set this parameter, this cell will be positioned when sorted as if this was its content.", "type": "string", "default": "Normally the cell is sorted by its visible content." } }, "description": "This template presents version history tables in a standardized format. Note that you may have to insert it in source mode, not visual mode.\n\nMany articles on Wikipedia use color-coded tables to illustrate the version or release history of software. The template has been imported from German Wikipedia, where it is used as the current standard for color-coding history tables.\n\nThis template is used within Wikitables, making use of the pipe syntax. Legends can be added as tables, as floating or non-floating containers. As colors are not visible to blind or visually-impaired readers, this template uses replacement information when necessary to improve accessibility, e.g. using the \"title\" attribute. (See Wikipedia:WikiProject Accessibility.)\n\nWhen creating a version history, please note that less is more: Wikipedia is not a directory or changelog. Only important or major releases should be documented in Wikipedia. See the Manual of Style for Computing topics for further guidelines.", "format": "inline" } </templatedata> == Limitations == * The current version of the template is known to fail creating correct cell contents when combined with the "colspan" keyword for table cell joining - except for the legend item. * The current version of the template doesn't apply styles correctly if only the table cells are used without the legend. == See also == * [[Template:Table cell templates]] β a family of related templates * [[Template:Dts]] β used to correctly sort and display dates in a sortable table * {{tl|Oldid}} <includeonly>{{Sandbox other|| <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Legend templates]] [[Category:Table templates|{{PAGENAME}}]] [[Category:Software templates]] }}</includeonly>
Summary:
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:!)
(
edit
)
Template:!-
(
edit
)
Template:(!
(
edit
)
Template:Anchor
(
edit
)
Template:Cipher
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Further
(
edit
)
Template:Mbox
(
edit
)
Template:Para
(
edit
)
Template:Sandbox other
(
edit
)
Template:See
(
edit
)
Template:Strong
(
edit
)
Template:Subpage other
(
edit
)
Template:TemplateDataHeader
(
edit
)
Template:TemplateData header
(
edit
)
Template:Template link
(
edit
)
Template:Template other
(
edit
)
Template:Template parameter usage
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tl
(
edit
)
Template:Uses TemplateStyles
(
edit
)
Template:Version
(
edit
)
Template:Version/styles.css
(
edit
)
Template:Yesno
(
edit
)
Template:Yesno-no
(
edit
)
Module:Anchor
(
edit
)
Module:Arguments
(
view source
) (protected)
Module:Check for unknown parameters
(
edit
)
Module:Format link
(
edit
)
Module:Hatnote
(
edit
)
Module:Hatnote/styles.css
(
edit
)
Module:Hatnote list
(
edit
)
Module:Labelled list hatnote
(
edit
)
Module:List
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:String
(
edit
)
Module:TNT
(
edit
)
Module:TableTools
(
edit
)
Module:Text
(
edit
)
Module:Text/data
(
edit
)
Module:Uses TemplateStyles
(
edit
)
Module:Yesno
(
view source
) (protected)
This page is a member of a hidden category:
Category:Pages with script errors
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Donate
Tools
What links here
Related changes
Upload file
Special pages
Page information