Actions

Template

Difference between revisions of "Fileref"

From Sonic Retro

Line 18: Line 18:
 
<references/>
 
<references/>
  
[[Category:Sonic Retro templates]]
+
[[Category:Templates]]
 
</noinclude><includeonly>{{#vardefine:filename|{{{1}}}}}{{#vardefine:quote|{{{quote|}}}}}{{#ifexist:File:{{#var:filename}}|<span style="display:none;">[[Media:{{#var:filename}}]]</span>}}{{#tag: ref | {{#if:{{#var:quote}}|"{{#var:quote}}",&nbsp;}}{{#if: {{{page|}}} | [{{fullurl:File:{{#var:filename}}|page={{{page}}}}} File:{{#var:filename}}, page {{{page}}}] | [[:File:{{#var:filename}}]]}} | name=":File:{{#var:filename}}_p{{{page}}}{{#var:quote}}" }}{{clearvar|quote}}</includeonly>
 
</noinclude><includeonly>{{#vardefine:filename|{{{1}}}}}{{#vardefine:quote|{{{quote|}}}}}{{#ifexist:File:{{#var:filename}}|<span style="display:none;">[[Media:{{#var:filename}}]]</span>}}{{#tag: ref | {{#if:{{#var:quote}}|"{{#var:quote}}",&nbsp;}}{{#if: {{{page|}}} | [{{fullurl:File:{{#var:filename}}|page={{{page}}}}} File:{{#var:filename}}, page {{{page}}}] | [[:File:{{#var:filename}}]]}} | name=":File:{{#var:filename}}_p{{{page}}}{{#var:quote}}" }}{{clearvar|quote}}</includeonly>

Revision as of 19:20, 1 January 2022

Template for file references.

Parameters:

  • 1: Filename.
  • page: Page number. Used for multi-page PDF documents.
  • quote: A specific quote, helpful if referencing long pages

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.