Template:Dump: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
mNo edit summary
m (Text replacement - "<br>" to "<br/>")
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
<onlyinclude>{{:{{Zelda|{{{1|aol}}}}} Text Dump/Select|{{{2|27}}}|{{#switch:{{{3|}}}|nl|<br>=<br>|{{S}}}}}}{{#if:{{{3|}}}|{{FIXME}} This template's usage will be changing, and this article will have to be adapted to the new usage.}}</onlyinclude>
<onlyinclude>{{#vardefine:usedelim|}}{{#if: {{#explode:{{{2|}}}|\|1}}
| {{#vardefine:ctr|-1}}{{#while: | {{#vardefineecho:slashquote|{{#explode:{{{2|}}}|\|{{++|ctr}}}}}}
  | {{#if: {{#explode:{{#var:slashquote}}|-|1}}
    | {{#vardefine:first|{{#explode:{{#var:slashquote}}|-|0}}}}{{#vardefine:last|{{#explode:{{#var:slashquote}}|-|1}}}}<!--
  -->{{#loop: qid | {{#var:first}} | {{#expr:{{!!=|last|{{#var:first}}}}-{{#var:first}}+1}}
      | {{Dump/Display|{{{1}}}|{{#var:qid}}|qdelim={{{qdelim|{{S}}}}}|ldelim={{{ldelim|{{S}}}}}}}
      }}
    | {{Dump/Display|{{{1}}}|{{#var:slashquote}}|qdelim={{{qdelim|{{S}}}}}|ldelim={{{ldelim|{{S}}}}}}}
    }}
  }}
| {{#if: {{#explode:{{{2|}}}|-|1}}
  | {{#vardefine:first|{{#explode:{{{2|}}}|-|0}}}}{{#vardefine:last|{{#explode:{{{2|}}}|-|1}}}}<!--
-->{{#loop: qid | {{#var:first}} | {{#expr:{{!!=|last|{{#var:first}}}}-{{#var:first}}+1}}
    | {{Dump/Display|{{{1}}}|{{#var:qid}}|qdelim={{{qdelim|{{S}}}}}|ldelim={{{ldelim|{{S}}}}}}}
    }}
  | {{Dump/Display|{{{1}}}|{{{2|}}}|qdelim={{{qdelim|{{S}}}}}|ldelim={{{ldelim|{{S}}}}}}}
  }}
}}</onlyinclude>


==Purpose==
==Purpose==
Use this template to retrieve a specific quote from a text dump. These are frequently used for references by the [[Template:Cite|Cite]] template and in captions by various {{Catlink|Caption Templates}}.
Use this template to retrieve a specific quote from a text dump. These are frequently used for references by the {{Temlink|Ref}} template and in captions by various {{Catlink|Caption Templates}}.


==Usage==
==Usage==
{{Usage|dump|quote|behavior}}
{{Usage|dump|quote}}
{{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|behavior|If "nl" or "<br>", newlines will be preserved. Otherwise the text will appear on one line.|optional}}
{{Usage/Param|ldelim|If "<nowiki>ldelim=<br/></nowiki>" is provided, newlines will be preserved as they appear in the game. Otherwise the text will appear on one line.|optional|[space]}}
{{Usage/Param|qdelim|For multiple quotes, a delimiter can be passed to this named parameter.|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 one or more ranges separated by backslashes (\). For example, {{Usage|SS|6552-6554\6556}}




{{Cat|Utility Templates}}
{{Cat|Utility Templates}}

Latest revision as of 15:36, February 8, 2015

{{:{{{1}}} Text Dump/Select|| }}

Purpose

Use this template to retrieve a specific quote from a text dump. These are frequently used for references by the {{Ref}} template and in captions by various [[Caption Templates]].

Usage

{{Dump| dump | quote }}

  • 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 "ldelim=<br/>" is provided, newlines will be preserved as they appear in the game. Otherwise the text will appear on one line. (Optional. Default: [space])
  • qdelim — For multiple quotes, a delimiter can be passed to this named parameter. (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 one or more ranges separated by backslashes (\). For example, {{Dump| SS | 6552-6554\6556 }}