Difference between revisions of "Template:AUR"

From ArchWiki
Jump to: navigation, search
(accept encoded string, discussed in Help_talk:Style/Package_installation#url-encoding_package_names)
(Use {{urlencode}}. Second parameter is now ignored.)
Line 7: Line 7:
 
{{Codeline|<nowiki>{{AUR|package}}</nowiki>}}
 
{{Codeline|<nowiki>{{AUR|package}}</nowiki>}}
  
In cases where the package name contains characters not allowed in the URL, you should use the second optional argument to provide the correctly-encoded string:
+
Special characters in the package name are automatically encoded in the URL, for example
  
{{Codeline|<nowiki>{{AUR|package+|package%2B}}</nowiki>}}
+
{{Codeline|<nowiki>{{AUR|compiz-plugins-unsupported++}}</nowiki>}} → {{AUR|compiz-plugins-unsupported++}}
  
 
====Example====
 
====Example====
  
{{AUR|package}}</noinclude><includeonly><span style="font-family: monospace">[https://aur.archlinux.org/packages.php?K={{{2|{{{1}}}}}}&SeB=x {{{1}}}]</span></includeonly>
+
{{AUR|package}}</noinclude><includeonly><span style="font-family: monospace">[https://aur.archlinux.org/packages.php?K={{urlencode:{{{1}}}}}&SeB=x {{{1}}}]</span></includeonly>

Revision as of 03:05, 27 October 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 AUR.

Usage

Template:Codeline

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

Template:Codelinecompiz-plugins-unsupported++AUR

Example

packageAUR