Actions

Template

Difference between revisions of "Fileref"

From Sonic Retro

(Reduce linebreaks.)
m
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>Template for file references. This template uses the [[Template:ref2|ref2]] template.
+
<noinclude>Template for file references.
  
 
Parameters:
 
Parameters:
 
* 1: Filename.
 
* 1: Filename.
 +
* page: Page number. Used for multi-page PDF documents.
  
Example: SADXBeta8.png{{fileRef2|SADXBeta8.png}}
+
Examples:
{{refs}}
+
* <nowiki>SADXBeta8.png{{fileref|SADXBeta8.png}}</nowiki> &rarr; SADXBeta8.png{{fileref|SADXBeta8.png}}
</noinclude>
+
* <nowiki>Sonic 3D Saturn EU manual, page 32{{fileref|Sonic3D Sat EU manual.pdf|page=32}}</nowiki> &rarr; Sonic 3D Saturn EU manual, page 32{{fileref|Sonic3D Sat EU manual.pdf|page=32}}
{{#vardefine:filename|{{{1}}}}}<span style="display:none;">[[Media:{{#var:filename}}]]</span>{{ref2|File:{{#var:filename}}|{{#var:filename}}}}
+
 
 +
==See also==
 +
* [[Template:Ref]] for referencing other pages on the wiki or other sites in general.
 +
 
 +
==References==
 +
Since this template uses the <nowiki><ref></nowiki> tag, all pages that use this template will have an auto-generated references list appended to the end of the page. To prevent confusion, a <nowiki><references/></nowiki> tag should be added to the end of the page in a dedicated "References" section, such as this one.
 +
<references/>
 +
 
 +
[[Category:Sonic Retro templates]]
 +
</noinclude><includeonly>{{#vardefine:filename|{{{1}}}}}{{#ifexist:File:{{#var:filename}}|<span style="display:none;">[[Media:{{#var:filename}}]]</span>}}{{#tag: ref | {{#if: {{{page|}}} | [{{fullurl:File:{{#var:filename}}|page={{{page}}}}} File:{{#var:filename}}, page {{{page}}}] | [[:File:{{#var:filename}}]]}} | name=":File:{{#var:filename}}_p{{{page}}}" }}</includeonly>

Revision as of 02:42, 23 January 2017

Template for file references.

Parameters:

  • 1: Filename.
  • page: Page number. Used for multi-page PDF documents.

Examples:

See also

  • Template:Ref for referencing other pages on the wiki or other sites in general.

References

Since this template uses the <ref> tag, all pages that use this template will have an auto-generated references list appended to the end of the page. To prevent confusion, a <references/> tag should be added to the end of the page in a dedicated "References" section, such as this one.