Difference between revisions of "Fileref"

From Sega Retro

Line 1: Line 1:
<noinclude>Template for file references.
+
<noinclude>{{#cargo_declare:
 +
_table = filerefs
 +
| name=text
 +
| file=text
 +
| page=integer
 +
}}
 +
Template for file references.
  
 +
==Usage==
 
Parameters:
 
Parameters:
 
* 1: Filename.
 
* 1: Filename.
Line 17: Line 24:
  
 
[[Category:Sega Retro templates]]
 
[[Category:Sega 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}}}" }}{{incvar|refcount}}</includeonly>
+
</noinclude><includeonly>{{#vardefine:filename|{{{1}}}}}{{#cargo_store:
 +
_table = filerefs
 +
| name={{#titleparts:{{PAGENAME}}}}
 +
| file={{#var:filename}}
 +
| page={{{page|}}}
 +
}}{{#tag: ref | {{#if: {{{page|}}} | [{{fullurl:File:{{#var:filename}}|page={{{page|}}}}} File:{{#var:filename}}, page {{{page|}}}] | [[:File:{{#var:filename}}]]}} | name=":File:{{#var:filename}}_p{{{page|}}}" }}{{incvar|refcount}}</includeonly>

Revision as of 00:04, 1 February 2020

This template defines the table "filerefs". View table. Template for file references.

Usage

Parameters:

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

Examples:

  • GoldenAxe Title.png{{fileref|GoldenAxe Title.png}} → GoldenAxe Title.png[1]
  • Golden Axe Mega Drive US manual, page 32{{fileref|GoldenAxe MD US Manual.pdf|page=19}} → Golden Axe Mega Drive US manual, page 19[2]

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.