Template:Sandbox: Difference between revisions

From Alpine Linux
m (Add documentation...)
No edit summary
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}} | short = 3.20 | v = v3.20 | 3.20.3 }}</includeonly>
<noinclude><!--                          ^^^^      ^^^^^  ^^^^^^
When updating this template, the latest version string must be changed three times, two lines above this comment
The first is the short version (major.minor)
The second is the short version prefixed with a lowercase v (vmajor.minor)
The final is the full version string (major.minor.patchlevel)--></noinclude>
<noinclude>{{Template}}
<noinclude>{{Template}}
This template produces a string containing the latest version of Alpine Linux


=== Usage ===
'''A clickable message Pill (wikilink).'''
<pre>{{AlpineLatest|short|v}}</pre>


{{define|short|The string produced will only contain the minor and major version}}
====Usage====
{{define|v|The string produced will only contain the minor and major version prefixed with a v}}
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Installation}}</nowiki>}}


This template will only accept one parameter at a time, all parameters are optional.<br>
====Parameters====
If no parameters are supplied, or the parameters which are supplied are invalid, the full version string (minor.major.patchlevel) will be produced.
* {{{1}}} - Prefix text (optional)
* {{{2}}} - Main text
* {{{3}}} - Border color
* {{{4}}} - Background color
* {{{5}}} - Float position (currently unused)
* {{{6}}} - Wiki page name (required)


=== Examples ===
====Example====
Display the full version string of the latest Alpine Linux stable:
{{Pill_clickable||v3.22.x|green|palegreen||Installation}}
<pre>{{AlpineLatest}}</pre>
will produce:
{{AlpineLatest}}


Display the short version string of the latest Alpine Linux stable:
</noinclude><includeonly><span style="padding:2px;background-color:{{{4}}};border:2px solid:{{{3}}};border-radius:1em;display:inline-block;font-size:80%;">[https://wiki.alpinelinux.org/wiki/{{{6}}} <strong>{{{1}}}</strong>{{{2}}}]</span></includeonly>
<pre>{{AlpineLatest|short}}</pre>
will produce:
{{AlpineLatest|short}}
 
Display the short version string of the latest Alpine Linux stable, prefixed with v:
<pre>{{AlpineLatest|v}}</pre>
will produce:
{{AlpineLatest|v}}
</noinclude>
<!--If you're updating the string containing the latest version of Alpine, go to the top!-->

Latest revision as of 06:41, 7 December 2025

Template Documentation for Sandbox

This page is a template and should only be used as part of other articles. For more information, read Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to voice your opinion regarding this template.

A clickable message Pill (wikilink).

Usage

{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Installation}}

Parameters

  • {{{1}}} - Prefix text (optional)
  • {{{2}}} - Main text
  • {{{3}}} - Border color
  • {{{4}}} - Background color
  • {{{5}}} - Float position (currently unused)
  • {{{6}}} - Wiki page name (required)

Example

v3.22.x