Template:PDFlink/doc

MyWikiBiz, Author Your Legacy — Thursday November 21, 2024
< Template:PDFlink
Revision as of 16:52, 7 December 2006 by Centiare (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Edit-paste.svg
This is the template documentation page for {{PDFlink}}.
It is not intended to be viewed directly. If it uses variables, some links may appear broken. Do not replace these variables with hardcoded page names or URLs.

Purpose

Highlighting that a link points to a PDF document (on some systems PDF files may take time to download and display within the browser, and their use on many websites is not compliant with the Web Content Accessibility Guidelines).

Usage

The following lines:

{{PDFlink|[http://www.example.com/Link.pdf Link]}}
{{PDFlink|[http://www.example.com/Link.pdf Link]|32&nbsp;[[KiB]]}}

yield:

Template:PDFlink
Template:PDFlink

Note: It was previously possible to add the icon with {{PDFlink}} by itself, but the functionality has been changed and this no longer works in Internet Explorer. You must surround it with the template as shown above.

Limitations

As the template uses unnamed parameters, links containing = or | will cause the link to not display at all. The two workarounds to this limitation are to replace the entity with an indirect character reference as &#61; and &#124;, respectively, or to use the numbered parameter (1= and 2=) for each parameter.

Examples:

  • {{PDFlink|[http://www.com/bla?a=xy|Link.pdf Link to a PDF]|32KB}}
  • {{PDFlink|[http://www.com/bla?a&#61;xy&#124;Link.pdf Link to a PDF]|32KB}}
  • {{PDFlink|1=[http://www.com/bla?a=xy&#124;Link.pdf Link to a PDF]|2=32KB}}

See also