Template:Pill clickable: Difference between revisions
Prabuanand (talk | contribs) (added back float position) |
Prabuanand (talk | contribs) (changed Template to take style from Template:Pill) |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude>{{Template}} | <noinclude>{{Template}} | ||
'''A message Pill with clickable [[Help:Editing#Internal_links|wikilink]] based on [[:Template:Pill]].''' | |||
''' | ====Usage==== | ||
The template supports both positional and named parameters. Named parameters are recommended for clarity. | |||
'''Named parameters:''' | |||
{{Codeline|1=<nowiki>{{Pill_clickable|text=v3.22.x|link=Release Notes for Alpine 3.22.0}}</nowiki>}} | |||
'''Positional parameters:''' | |||
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}}</nowiki>}} | |||
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF|| | {{Codeline|1=<nowiki>{{Pill_clickable||v3.15.x-v3.18.x|#aaa|#eee||Release Notes for Alpine 3.19.0}}</nowiki>}} | ||
{{Codeline|1=<nowiki>{{Pill_clickable||v3.19.x-v3.20.x|orange|goldenrod||Release Notes for Alpine 3.21.0}}</nowiki>}} | |||
{{Codeline|1=<nowiki>{{Pill_clickable||v3.21.x|cadetblue|lightblue||Release Notes for Alpine 3.21.0}}</nowiki>}} | |||
{{Codeline|1=<nowiki>{{Pill_clickable||v3.22.x|green|palegreen||Release Notes for Alpine 3.22.0}}</nowiki>}} | |||
{{Codeline|1=<nowiki>{{Pill_clickable|Version:|current|purple|cornflowerblue|left|Release Notes for Alpine 3.23.0}}</nowiki>}} | |||
{{Codeline|1=<nowiki>{{Pill_clickable||WIP|goldenrod|yellow||Release Notes for Alpine 3.23.0}}</nowiki>}} | |||
====Parameters==== | ====Parameters==== | ||
{| class="wikitable" | |||
|+ Parameter reference (supports both positional and named parameters) | |||
|- | |||
! Position !! Field Name !! Description !! Mandatory | |||
|- | |||
| 1 || prefix || Prefix text || optional | |||
|- | |||
| 2 || text || Main text (also used as link display text) || required | |||
|- | |||
| 3 || border || Border color || optional (default: green) | |||
|- | |||
| 4 || bg || Background color || optional (default: palegreen) | |||
|- | |||
| 5 || float || Float position || optional (default: right) | |||
|- | |||
| 6 || link || Wiki page name/anchor || required | |||
|} | |||
====Example==== | ====Example==== | ||
{{Pill_clickable||v3.22.x|green|palegreen|| | {{Pill_clickable|text=v3.22.x|link=Release Notes for Alpine 3.22.0}} | ||
{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}} | |||
</noinclude><includeonly> | {{Pill_clickable||v3.15.x-v3.18.x|#aaa|#eee||Release Notes for Alpine 3.19.0}} | ||
{{Pill_clickable||v3.19.x-v3.20.x|orange|goldenrod||Release Notes for Alpine 3.21.0}} | |||
{{Pill_clickable||v3.21.x|cadetblue|lightblue||Release Notes for Alpine 3.21.0}} | |||
{{Pill_clickable||v3.22.x|green|palegreen||Release Notes for Alpine 3.22.0}} | |||
{{Pill_clickable|Version:|current|purple|cornflowerblue|left|Release Notes for Alpine 3.23.0}} | |||
{{Pill_clickable||WIP|goldenrod|yellow||Release Notes for Alpine 3.23.0}} | |||
</noinclude><includeonly>[[{{{link|{{{6}}}}}}|{{Pill|prefix={{{prefix|{{{1|}}}}}}|text={{{text|{{{2}}}}}}|border={{{border|{{{3|}}}}}}|bg={{{bg|{{{4|}}}}}}|float={{{float|{{{5}}}}}}}}]]</includeonly> | |||
Latest revision as of 16:17, 7 December 2025
Template Documentation for Pill clickable
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 message Pill with clickable wikilink based on Template:Pill.
Usage
The template supports both positional and named parameters. Named parameters are recommended for clarity.
Named parameters:
{{Pill_clickable|text=v3.22.x|link=Release Notes for Alpine 3.22.0}}
Positional parameters:
{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}} {{Pill_clickable||v3.15.x-v3.18.x|#aaa|#eee||Release Notes for Alpine 3.19.0}} {{Pill_clickable||v3.19.x-v3.20.x|orange|goldenrod||Release Notes for Alpine 3.21.0}} {{Pill_clickable||v3.21.x|cadetblue|lightblue||Release Notes for Alpine 3.21.0}} {{Pill_clickable||v3.22.x|green|palegreen||Release Notes for Alpine 3.22.0}} {{Pill_clickable|Version:|current|purple|cornflowerblue|left|Release Notes for Alpine 3.23.0}} {{Pill_clickable||WIP|goldenrod|yellow||Release Notes for Alpine 3.23.0}}
Parameters
| Position | Field Name | Description | Mandatory |
|---|---|---|---|
| 1 | prefix | Prefix text | optional |
| 2 | text | Main text (also used as link display text) | required |
| 3 | border | Border color | optional (default: green) |
| 4 | bg | Background color | optional (default: palegreen) |
| 5 | float | Float position | optional (default: right) |
| 6 | link | Wiki page name/anchor | required |
Example
v3.22.x <-v3.14.x v3.15.x-v3.18.x v3.19.x-v3.20.x v3.21.x v3.22.x Version:current WIP