Template:Sandbox: Difference between revisions

From Alpine Linux
mNo edit summary
No edit summary
 
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>This is the sandbox template that anyone can edit to figure out how templates work or to test a new template before deplying it...</noinclude>
<noinclude>{{Template}}
<noinclude>{{Template}}
An inline link to search for the given package in the Package Browser.


=== Usage ===
'''A clickable message Pill (wikilink).'''
<pre>{{Pkg|package}}</pre>


Special characters in the package name will automatically be url-encoded. "*" can be used as a wildcard.
====Usage====
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Installation}}</nowiki>}}


=== Examples ===
====Parameters====
<pre>{{Pkg|gtk+2.0}}</pre>
* {{{1}}} - Prefix text (optional)
will produce:
* {{{2}}} - Main text
{{Pkg|gtk+2.0}}
* {{{3}}} - Border color
* {{{4}}} - Background color
* {{{5}}} - Float position (currently unused)
* {{{6}}} - Wiki page name (required)


====Example====
{{Pill_clickable||v3.22.x|green|palegreen||Installation}}


<pre>{{Pkg|gtk*}}</pre>
</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>
will produce:
{{Pkg|gtk*}}
 
 
</noinclude><includeonly>{{ #if: {{{1|}}} | <span class="plainlinks" style="font-family: monospace, Courier;font-size:10pt;">[https://pkgs.alpinelinux.org/packages?name={{urlencode:{{ #if: {{{name|}}} | {{{name}}} |{{{1}}}}}}}&branch={{urlencode:{{ #if: {{{branch|}}} | {{{branch}}} | edge}}}}&repo={{urlencode:{{ #if: {{{repo|}}} | {{{repo}}}}}}}&arch={{urlencode:{{ #ifeq: {{{arch|+}}} | {{{arch|-}}} | {{{arch}}} | x86_64 }}}}&maintainer={{urlencode:{{ #if: {{{maintainer|}}} | {{{maintainer}}}}}}} {{ #if: {{{name|}}} | {{{name}}} |{{{1}}}}}]</span> | <span class="error">First parameter cannot be undefined or empty in template: <b>Template:Pkg</b></span> }}</includeonly>

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