Template:Dump: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
mNo edit summary |
(added multiquote functionality) |
||
Line 1: | Line 1: | ||
<onlyinclude>{{:{{ | <onlyinclude>{{#fornumargs: argnum | argval | ||
| {{#ifeq:{{#var:argnum}}|1||{{#vardefine:first|{{#explode:{{#var:argval}}|-|0}}}}{{#vardefine:last|{{#explode:{{#var:argval}}|-|1}}}}<!-- | |||
-->{{#loop: qid | |||
| {{#var:first}} | {{#expr:{{!!=|last|{{#var:first}}}}-{{#var:first}}+1}} | |||
| {{:{{Zelda|{{{1}}}}} Text Dump/Select|{{#var:qid}}|{{!!=|dump-ldelim|{{{ldelim|{{S}}}}}}}}}{{!!=|dump-qdelim|{{{qdelim|{{S}}}}}}} | |||
}}}} | |||
}}</onlyinclude> | |||
==Purpose== | ==Purpose== | ||
Line 5: | Line 11: | ||
==Usage== | ==Usage== | ||
{{Usage|dump|quote| | {{Usage|dump|quote|ldelim{{=}}|qdelim{{=}}}} | ||
{{Usage/Param|dump|A game abbreviation serving as a keyword to select from which dump to pull the quote.}} | {{Usage/Param|dump|A game abbreviation serving as a keyword to select from which dump to pull the quote.}} | ||
{{Usage/Param|quote|The quote's ID which can be found on the dump page.}} | {{Usage/Param|quote|The quote's ID which can be found on the dump page.}} | ||
{{Usage/Param| | {{Usage/Param|ldelim|If "<br>", newlines will be preserved as they appear in the game. Otherwise the text will appear on one line.|optional|[space]}} | ||
{{Usage/Param|qdelim|Delimiter between quotes if more than one quote is specified.|optional|[space]}} | |||
To find the quote ID, find the desired quote in the text dump (see {{Catlink|Text Dumps}}) and hover over the tooltip ({{Tt|like this}}) at the beginning of the quote. | To find the quote ID, find the desired quote in the text dump (see {{Catlink|Text Dumps}}) and hover over the tooltip ({{Tt|like this}}) at the beginning of the quote. | ||
Several quotes can be retrieved at once by passing in multiple arguments and/or supplying ranges. For example, {{Usage|SS|6552-6554|6556}} | |||
{{Cat|Utility Templates}} | {{Cat|Utility Templates}} |
Revision as of 01:33, February 24, 2013
Purpose
Use this template to retrieve a specific quote from a text dump. These are frequently used for references by the Cite template and in captions by various [[Caption Templates]].
Usage
{{Dump| dump | quote | ldelim= | qdelim= }}
- dump — A game abbreviation serving as a keyword to select from which dump to pull the quote.
- quote — The quote's ID which can be found on the dump page.
- ldelim — If "
", newlines will be preserved as they appear in the game. Otherwise the text will appear on one line. (Optional. Default: [space]) - qdelim — Delimiter between quotes if more than one quote is specified. (Optional. Default: [space])
To find the quote ID, find the desired quote in the text dump (see [[Text Dumps]]) and hover over the tooltip (?) at the beginning of the quote.
Several quotes can be retrieved at once by passing in multiple arguments and/or supplying ranges. For example, {{Dump| SS | 6552-6554 | 6556 }}