Bahaipedia
Bahaipedia
Menu
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Template
Discussion
View history
Talk
Contributions
Create account
Log in
Navigation
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Learn more
Core topics
Bahá’í Faith
Central Figures
Teachings
Practices
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Translations

Template:PDFlink

From Bahaipedia
Jump to:navigation, search

{{{1}}}PDF ({{{2}}})

Template documentation[view] [edit] [history] [purge]

{{PDFlink}} highlights 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[edit]

The following lines:

{{PDFlink|[http://www.example.org/Link.pdf Link]}}
{{PDFlink|[http://www.example.org/Link.pdf Link]|32 KB}}
{{PDFlink|[http://www.example.org/Link.pdf Link]|32 [[KiB]]}}

yield:

LinkPDF
LinkPDF (32 KB)
LinkPDF (32 KiB)

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

PDFbot[edit]

An unassisted bot (User:PDFbot) has been created to add and keep file size information current. In addition, it will fix many mistakes and the limitation as described in the section below.

Note: the bot will replace the contents of the second parameter when updating the file size.

Limitations[edit]

As this template uses unnamed parameters links containing = or | will cause the link to not display at all. The workaround is to either replace the entity with an indirect character reference as = and |, respectively, or to use the numbered parameter (1= and 2=) for each parameter to take care of =, or to use {{!}} to take care of |.

Examples:

  • {{PDFlink|[http://example.org/bla?a=xy|Link.pdf Link to a PDF]|32KB}}
    • 32KBPDF
  • {{PDFlink|[http://example.org/bla?a=xy|Link.pdf Link to a PDF]|32KB}}
    • Link to a PDFPDF (32KB)
  • {{PDFlink|1=[http://example.org/bla?a=xy{{!}}Link.pdf Link to a PDF]|2=32KB}}
    • Link to a PDFPDF (32KB)
The above documentation is transcluded from Template:PDFlink/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://bahaipedia.org/index.php?title=Template:PDFlink&oldid=11770"
Category:
  • External link file type templates
This page was last edited on 26 September 2007, at 19:45.
Text is available under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.
Privacy policy
About Bahaipedia
Disclaimers
Powered by MediaWiki