Template:File Reference: Difference between revisions

Jump to navigation Jump to search
Added Template:References to "see also" section
No edit summary
(Added Template:References to "see also" section)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{file |}}}
<includeonly>{{#if: {{{file |}}}  
|{{#if: {{{name |}}}
| {{#if: {{{name |}}}  
  | {{#tag: ref | <code>{{{file}}}.{{{type |xml}}}</code> | name={{{name}}}}}
| {{#tag: ref | <code>{{{file}}}{{{type |.xml}}}</code>{{#if: {{{note |}}} |, {{{note}}} |}} | name={{{name}}}}}  
  | {{#tag: ref | <code>{{{file}}}.{{{type |xml}}}</code>}}
| {{#tag: ref | <code>{{{file}}}{{{type |.xml}}}</code>{{#if: {{{note |}}} |, {{{note}}} |}}}}}}  
| {{Template Error}}
| {{Template Error}}}}</includeonly><noinclude>This template can be used to reference games files other than those present in the assembly, such as XML files.
}}</includeonly>
 
<noinclude>{{File Reference|file=ObjectBlueprints}}
{|class="wikitable"
!Parameter
!Notes
|-
|<code>file</code>
|Used to specify the file's name. Must be specified or you'll get a template error.
|-
|<code>type</code>
|Used to specify the file extension. <code>xml</code> by default.
|-
|<code>name</code>
|Used to specify a name for the citation itself, so one can use that citation again later via <code><nowiki><ref name="name-goes-here"/></nowiki></code>
|-
|<code>note</code>
|Used to add a note to the end of the citation if further clarification is necessary/desired.
|}
 
== Usage ==
See the bottom of the page for the results of these examples.
 
If you simply want to create a citation for an XML file that you don't plan on using again:
<pre><nowiki>{{File Reference
| file=FileName
}}</nowiki></pre>{{File Reference
| file=FileName
}}
 
If you need to specify a file extension that isn't XML, say for example, TXT:
<pre><nowiki>{{File Reference
| file=FileName
| type=.txt
}}</nowiki></pre>{{File Reference
| file=FileName
| type=.txt
}}
 
If you need to specify a file that has no extension, simply do so by specifying <code>type</code> and leaving it blank.
 
<pre><nowiki>{{File Reference
| file=FileName
| type=
}}</nowiki></pre>{{File Reference
| file=FileName
| type=
}}
 
If you need to give the citation a name so you can use it again later:
<pre><nowiki>{{File Reference
| file=FileName
| name=CitationName
}}</nowiki></pre>{{File Reference
| file=FileName
| name=CitationName
}}
 
If you do this, you can use that citation again without creating a new one. In this case, you'd do so via <code><nowiki><ref name="CitationName"/></nowiki></code>
<ref name="CitationName"/>
 
If you want to add a note to the end of the citation:
 
<pre><nowiki>{{File Reference
| file=FileName
| note=this is a note. Epic.
}}</nowiki></pre>{{File Reference
| file=FileName
| note=this is a note. Epic.
}}
 
== See Also ==
* [[Template:References]]
* [[Template:XML Reference]]
* [[Template:Code Reference]]
 
== References ==
<references />
 
[[Category:Reference Templates]]
 
</noinclude>
</noinclude>
312

edits

Navigation menu