Difference between revisions of "Template:Pkg"

From ArchWiki
Jump to: navigation, search
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
<noinclude>{{Template:Template}}
 
<noinclude>{{Template:Template}}
  
'''An inline link to search for the given package in the official repos.'''
+
'''An inline link to search for the given package in the [[Official Repositories]].'''
  
====Usage====
+
==Usage==
  
{{Codeline|1=<nowiki>{{Package Official|package}}</nowiki>}}
+
{{Ic|<nowiki>{{Pkg|package}}</nowiki>}}
  
{{Note|This template will ''search'' for <tt>package</tt> in the official repos. Thus, if <tt>package-''foo''</tt> and <tt>package-''bar''</tt> exist, all matching variations will be listed. In cases where the package name is ambiguous (e.g. {{Package Official|tea}}, which matches '''''tea'''''ser, ins'''''tea'''''d, etc.) a direct link may be preferred.}}
+
{{Note|This template will ''search'' for {{Ic|package}} in the official repos. Thus, if {{Ic|package-''foo''}} and {{Ic|package-''bar''}} exist, all matching variations will be listed. See also {{bug|26383}}.}}
  
====Example====
+
Special characters in the package name are automatically encoded in the URL, for example
  
{{Package Official|package}}</noinclude><includeonly><code>[https://www.archlinux.org/packages/?q={{{1}}} {{{1}}}]</code></includeonly>
+
{{Ic|<nowiki>{{Pkg|dvd+rw-tools}}</nowiki>}} → {{Pkg|dvd+rw-tools}}
 +
 
 +
==Example==
 +
 
 +
{{Pkg|package}}
 +
 
 +
==See also==
 +
 
 +
* [[Template:Grp]]
 +
* [[Template:AUR]]
 +
</noinclude><includeonly><span style="font-family: monospace">[https://www.archlinux.org/packages/?name={{urlencode:{{{1}}}}} {{{1}}}]</span></includeonly>

Revision as of 02:42, 15 December 2011

This page is a template. It contains no Arch Linux-related information, but should 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.

An inline link to search for the given package in the Official Repositories.

Usage

{{Pkg|package}}

Note: This template will search for package in the official repos. Thus, if package-foo and package-bar exist, all matching variations will be listed. See also FS#26383.

Special characters in the package name are automatically encoded in the URL, for example

{{Pkg|dvd+rw-tools}}dvd+rw-tools

Example

package

See also