Template:F/doc: Difference between revisions
More actions
docu |
m expansion |
||
| Line 1: | Line 1: | ||
__NOTOC__ | |||
{{TemplateBox | {{TemplateBox | ||
|1=1 | |1=1 | ||
|1d=file name: name of the file, with extension | |1d=file name: name of the file, with extension | ||
|2=2 | |2=2 | ||
|2d=display name: any | |2d=display name: any text. Default is the file name (par #1) | ||
|3=3 | |3=3 | ||
|3d=pixel size: numeric value. The picture is displayed inline in this size <ref name="a">It is ''not possible'' to display | |3d=pixel size: numeric value. The picture is displayed inline in this size <ref name="a">It is ''not possible'' to display images of other Wikipedias - only when the files are stored in the Commons</ref> | ||
|8=lang | |8=lang | ||
|8d=language code (ISO 639), if the file is in another Wikipedia <ref name="a"/> | |8d=language code (ISO 639), if the file is in another Wikipedia <ref name="a"/> | ||
|4=4 | |4=4 | ||
|4d='''b'''<ref name="b">Any of these parameter values (b, l, | |4d='''b'''<ref name="b">Any of these parameter values (b, l, n) can be passed in any sequence, each as an argument for one of the parameters either #4, #5 or #6: <tt><nowiki>{{F|X.jpg||16|b|l|n}}</nowiki></tt> is equivalent to <tt><nowiki>{{F|X.jpg||16|l|n|b}}</nowiki></tt></ref> (lowercase B) ''to draw a '''''b'''order'' around the displayed picture'' | ||
|5=5 | |5=5 | ||
|5d='''l'''<ref name="b"/> (lowercase L) ''display the image'' '''l'''eft ''of the file name | |5d={{0|.}}'''l'''<ref name="b"/> (lowercase L) ''to display the image'' '''l'''eft ''of the file name | ||
|6=6 | |6=6 | ||
|6d=''' | |6d='''n'''<ref name="b"/> (lowercase N) ''to display the name '''n'''ot-linking to the file'' | ||
|7= | |||
|7d= | |||
|name=Template:F | |name=Template:F | ||
|desc=<big> | |desc=<big>Establishes a link to the file whose name is given in par #1 and displays the name without the prefix "File:".</big><br> | ||
*If par# 1 is empty, {{F}} | Additional possibilities: | ||
*Instead of the file name, another name given in par# 2 can be displayed. | *If par #1 is empty, the default will be {{F}}. | ||
*It is possible to avoid the link | *Instead of the file name, another name given in par #2 can be displayed. | ||
*It is possible to avoid the link and display only the name of par #1 (or par #2). | |||
*The file itself (the image) can be displayed in any size inline after the name (or left of it). | *The file itself (the image) can be displayed in any size inline after the name (or left of it). | ||
*The displayed image can be surrounded by a border. | *The displayed image can be surrounded by a border. | ||
| Line 24: | Line 28: | ||
|usergroup=all | |usergroup=all | ||
|usage-notes=The parameters "n" and "l" allow better formatting, e.g. to get equal-wide rows when arranging several lines with displayed images — see the examples. | |||
|usage-notes= | |||
}} | }} | ||
== Examples == | == Examples == | ||
{{F|Buddhist flag.svg|''Buddhist flag''|3= | {{F|Buddhist flag.svg|''Buddhist flag''|3=64}} — {{F|Buddhist rainbow flag.svg|''Buddhist flag''|3=64|4=b|5=l}} (bordered) | ||
---- | ---- | ||
{{F}} {{0|00000}} without any parameter | |||
{{F|Yes_check.svg}} {{0|00}} only link | {{F|Yes_check.svg}} {{0|00}} only link | ||
{{F|Yes_check.svg||16| | {{F|Yes_check.svg|3=n}} {{0|00}} only name | ||
{{F|Yes_check.svg||16|n}} no link <small>(as in "other versions" of [[:File:Arrow-C.svg]].)</small> | |||
{{F|Yes_check.svg||16|b}} bordered | {{F|Yes_check.svg||16|b}} bordered | ||
{{F|Yes_check.svg||16|l | {{F|Yes_check.svg||16|l}} left of name <small>(as in "other versions" of [[:File:Symbol unrelated.svg]].)</small> | ||
== Notes == | |||
<references/> | <references/> | ||
<includeonly> | |||
[[Category:Internal link templates|{{PAGENAME}}]] | |||
[[Category:Typing-aid templates|{{PAGENAME}}]] | |||
</includeonly> | |||
Revision as of 06:26, 24 June 2012
Establishes a link to the file whose name is given in par #1 and displays the name without the prefix "File:".
Additional possibilities:
- If par #1 is empty, the default will be no name.
- Instead of the file name, another name given in par #2 can be displayed.
- It is possible to avoid the link and display only the name of par #1 (or par #2).
- The file itself (the image) can be displayed in any size inline after the name (or left of it).
- The displayed image can be surrounded by a border.
Usage
{{Template:F |1= |2= |3= |4= |5= |6= |7= |lang= }}
The parameters "n" and "l" allow better formatting, e.g. to get equal-wide rows when arranging several lines with displayed images — see the examples.
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | file name: name of the file, with extension | empty | optional | |
2 | display name: any text. Default is the file name (par #1) | empty | optional | |
3 | pixel size: numeric value. The picture is displayed inline in this size [1] | empty | optional | |
4 | b[2] (lowercase B) to draw a border around the displayed picture | empty | optional | |
5 | l[2] (lowercase L) to display the image left of the file name | empty | optional | |
6 | n[2] (lowercase N) to display the name not-linking to the file | empty | optional | |
7 | empty | optional | ||
lang | language code (ISO 639), if the file is in another Wikipedia [1] | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: the File namespace
The template is intended to be used by the following user groups: all users
Examples
Buddhist flag: —
Buddhist flag (bordered)
no name without any parameter
Yes check.svg only link
Yes check.svg only name
Yes check.svg: no link (as in "other versions" of File:Arrow-C.svg.)
Yes check.svg: bordered
Yes check.svg left of name (as in "other versions" of File:Symbol unrelated.svg.)
Notes
- ↑ 1.0 1.1 It is not possible to display images of other Wikipedias - only when the files are stored in the Commons
- ↑ 2.0 2.1 2.2 Any of these parameter values (b, l, n) can be passed in any sequence, each as an argument for one of the parameters either #4, #5 or #6: {{F|X.jpg||16|b|l|n}} is equivalent to {{F|X.jpg||16|l|n|b}}