Difference between revisions of "Template:QuoteList"

From UnderWiki
Jump to navigation Jump to search
(Sadly the only way I know to debug a template is to repeatedly save it. Adding second line.)
m (→‎Example: typofixxins)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><div style="float:left">Quotes:&nbsp;</div><div class="mw-collapsible  mw-collapsed" style="float:left">
 
<includeonly><div style="float:left">Quotes:&nbsp;</div><div class="mw-collapsible  mw-collapsed" style="float:left">
:{{#if:{{{2|}}}|{{{2|}}}: |}}<span style="font-style: bold;">{{{3|}}}</span>
+
*{{#if:{{{2|}}}|{{{2|}}}:&nbsp;|}}<b>{{{3|}}}</b>
:{{#if:{{{4|}}}| – {{#ifexist:{{{4|}}}|[[{{{4|}}}]]|{{{4|}}}}}| }} {{#if:{{{1|}}}| – {{{1|}}} | }} {{#if:{{{5|}}}| ({{{5|}}}) | }}
+
::<i>{{#if:{{{4|}}}| – {{#ifexist:{{{4|}}}|[[{{{4|}}}]]|{{{4|}}}}}|}} {{#if:{{{1|}}}| – {{{1|}}} |}}</i>
{{#if:{{{6|}}}|
+
{{#if:{{{8|}}}|
:{{#if:{{{7|}}}|{{{7|}}}: |}}<span style="font-style: bold;">{{{8|}}}</span>
+
*{{#if:{{{7|}}}|{{{7|}}}:&nbsp;|}}<b>{{{8|}}}</b>
:{{#if:{{{9|}}}| – {{#ifexist:{{{9|}}}|[[{{{9|}}}]]|{{{9|}}}}}| }} {{#if:{{{6|}}}| – {{{6|}}} | }} {{#if:{{{10|}}}| ({{{10|}}}) | }}
+
::<i>{{#if:{{{9|}}}| – {{#ifexist:{{{9|}}}|[[{{{9|}}}]]|{{{9|}}}}}|}} {{#if:{{{6|}}}| – {{{6|}}} |}}</i>
 +
|}}{{#if:{{{13|}}}|
 +
*{{#if:{{{12|}}}|{{{12|}}}:&nbsp;|}}<b>{{{13|}}}</b>
 +
::<i>{{#if:{{{14|}}}| – {{#ifexist:{{{14|}}}|[[{{{14|}}}]]|{{{14|}}}}}|}} {{#if:{{{11|}}}| – {{{11|}}} |}}</i>
 +
|}}{{#if:{{{18|}}}|
 +
*{{#if:{{{17|}}}|{{{17|}}}:&nbsp;|}}<b>{{{18|}}}</b>
 +
::<i>{{#if:{{{19|}}}| – {{#ifexist:{{{19|}}}|[[{{{19|}}}]]|{{{19|}}}}}|}} {{#if:{{{16|}}}| – {{{16|}}} |}}</i>
 +
|}}{{#if:{{{23|}}}|
 +
*{{#if:{{{22|}}}|{{{22|}}}:&nbsp;|}}<b>{{{23|}}}</b>
 +
::<i>{{#if:{{{24|}}}| – {{#ifexist:{{{24|}}}|[[{{{24|}}}]]|{{{24|}}}}}|}} {{#if:{{{21|}}}| – {{{21|}}} |}}</i>
 +
|}}{{#if:{{{28|}}}|
 +
*{{#if:{{{27|}}}|{{{27|}}}:&nbsp;|}}<b>{{{28|}}}</b>
 +
::<i>{{#if:{{{29|}}}| – {{#ifexist:{{{29|}}}|[[{{{29|}}}]]|{{{29|}}}}}|}} {{#if:{{{26|}}}| – {{{26|}}} |}}</i>
 +
|}}{{#if:{{{33|}}}|
 +
*{{#if:{{{32|}}}|{{{32|}}}:&nbsp;|}}<b>{{{33|}}}</b>
 +
::<i>{{#if:{{{34|}}}| – {{#ifexist:{{{34|}}}|[[{{{34|}}}]]|{{{34|}}}}}|}} {{#if:{{{31|}}}| – {{{31|}}} |}}</i>
 +
|}}{{#if:{{{38|}}}|
 +
*{{#if:{{{37|}}}|{{{37|}}}:&nbsp;|}}<b>{{{38|}}}</b>
 +
::<i>{{#if:{{{39|}}}| – {{#ifexist:{{{39|}}}|[[{{{39|}}}]]|{{{39|}}}}}|}} {{#if:{{{36|}}}| – {{{36|}}} |}}</i>
 +
|}}{{#if:{{{43|}}}|
 +
*{{#if:{{{42|}}}|{{{42|}}}:&nbsp;|}}<b>{{{43|}}}</b>
 +
::<i>{{#if:{{{44|}}}| – {{#ifexist:{{{44|}}}|[[{{{44|}}}]]|{{{44|}}}}}|}} {{#if:{{{41|}}}| – {{{41|}}} |}}</i>
 +
|}}{{#if:{{{48|}}}|
 +
*{{#if:{{{47|}}}|{{{47|}}}:&nbsp;|}}<b>{{{48|}}}</b>
 +
::<i>{{#if:{{{49|}}}| – {{#ifexist:{{{49|}}}|[[{{{49|}}}]]|{{{49|}}}}}|}} {{#if:{{{46|}}}| – {{{46|}}} |}}</i>
 +
|}}{{#if:{{{53|}}}|
 +
*{{#if:{{{52|}}}|{{{52|}}}:&nbsp;|}}<b>{{{53|}}}</b>
 +
::<i>{{#if:{{{54|}}}| – {{#ifexist:{{{54|}}}|[[{{{54|}}}]]|{{{54|}}}}}|}} {{#if:{{{51|}}}| – {{{51|}}} |}}</i>
 +
|}}{{#if:{{{58|}}}|
 +
*{{#if:{{{57|}}}|{{{57|}}}:&nbsp;|}}<b>{{{58|}}}</b>
 +
::<i>{{#if:{{{59|}}}| – {{#ifexist:{{{59|}}}|[[{{{59|}}}]]|{{{59|}}}}}|}} {{#if:{{{56|}}}| – {{{56|}}} |}}</i>
 +
|}}{{#if:{{{63|}}}|
 +
*{{#if:{{{62|}}}|{{{62|}}}:&nbsp;|}}<b>{{{63|}}}</b>
 +
::<i>{{#if:{{{64|}}}| – {{#ifexist:{{{64|}}}|[[{{{64|}}}]]|{{{64|}}}}}|}} {{#if:{{{61|}}}| – {{{61|}}} |}}</i>
 +
|}}{{#if:{{{68|}}}|
 +
*{{#if:{{{67|}}}|{{{67|}}}:&nbsp;|}}<b>{{{68|}}}</b>
 +
::<i>{{#if:{{{69|}}}| – {{#ifexist:{{{69|}}}|[[{{{69|}}}]]|{{{69|}}}}}|}} {{#if:{{{66|}}}| – {{{66|}}} |}}</i>
 +
|}}{{#if:{{{73|}}}|
 +
*{{#if:{{{72|}}}|{{{72|}}}:&nbsp;|}}<b>{{{73|}}}</b>
 +
::<i>{{#if:{{{74|}}}| – {{#ifexist:{{{74|}}}|[[{{{74|}}}]]|{{{74|}}}}}|}} {{#if:{{{71|}}}| – {{{71|}}} |}}</i>
 +
|}}{{#if:{{{78|}}}|
 +
*{{#if:{{{77|}}}|{{{77|}}}:&nbsp;|}}<b>{{{78|}}}</b>
 +
::<i>{{#if:{{{79|}}}| – {{#ifexist:{{{79|}}}|[[{{{79|}}}]]|{{{79|}}}}}|}} {{#if:{{{76|}}}| – {{{76|}}} |}}</i>
 +
|}}{{#if:{{{83|}}}|
 +
*{{#if:{{{82|}}}|{{{82|}}}:&nbsp;|}}<b>{{{83|}}}</b>
 +
::<i>{{#if:{{{84|}}}| – {{#ifexist:{{{84|}}}|[[{{{84|}}}]]|{{{84|}}}}}|}} {{#if:{{{81|}}}| – {{{81|}}} |}}</i>
 +
|}}{{#if:{{{88|}}}|
 +
*{{#if:{{{87|}}}|{{{87|}}}:&nbsp;|}}<b>{{{88|}}}</b>
 +
::<i>{{#if:{{{89|}}}| – {{#ifexist:{{{89|}}}|[[{{{89|}}}]]|{{{89|}}}}}|}} {{#if:{{{86|}}}| – {{{86|}}} |}}</i>
 +
|}}{{#if:{{{93|}}}|
 +
*{{#if:{{{92|}}}|{{{92|}}}:&nbsp;|}}<b>{{{93|}}}</b>
 +
::<i>{{#if:{{{94|}}}| – {{#ifexist:{{{94|}}}|[[{{{94|}}}]]|{{{94|}}}}}|}} {{#if:{{{91|}}}| – {{{91|}}} |}}</i>
 +
|}}{{#if:{{{98|}}}|
 +
*{{#if:{{{97|}}}|{{{97|}}}:&nbsp;|}}<b>{{{98|}}}</b>
 +
::<i>{{#if:{{{99|}}}| – {{#ifexist:{{{99|}}}|[[{{{99|}}}]]|{{{99|}}}}}|}} {{#if:{{{96|}}}| {{{96|}}} |}}</i>
 
|}}
 
|}}
 
</div><div style="clear:both"></div></includeonly>
 
</div><div style="clear:both"></div></includeonly>
 
 
<noinclude>
 
<noinclude>
 
The purpose of this template is to provide a collapsible block of up to (at the time of writing) 20 quotes. This is a lot cheaper than calling [[Template::Quote]] twenty times, so prevents pages complaining about "too many expensive parser calls".
 
The purpose of this template is to provide a collapsible block of up to (at the time of writing) 20 quotes. This is a lot cheaper than calling [[Template::Quote]] twenty times, so prevents pages complaining about "too many expensive parser calls".
 
+
3.0
 
==Usage==
 
==Usage==
Each line has five elements, ''in this order'':  
+
Each line has four elements, with no surrounding whitespace, ''in this order'':  
*1 the reference name;
+
*1 the variable reference name;
 
*2 the title;
 
*2 the title;
 
*3 the quoted text (REQUIRED!);
 
*3 the quoted text (REQUIRED!);
*4 the speaker;
+
*4 the speaker and/or any notes about the quote.
*5 and any notes.
+
You should probably include at least the quoted text, and one other field.
While most of these can be empty, the separators for all fields must be present.
+
 
 +
The separators for all fields must be present, including the one at the end of the line (used to swallow the line break).
  
 
===Example===
 
===Example===
<nowiki>{{QuoteList
+
<pre>{{QuoteList
|| Reference name || Title || Big ol' blob o' quoted texts || NPC who said that || Sidenotes
+
|Reference name|Title|Big ol' blob o' quoted texts|NPC who said that|
|| Signage/spectre || Warning || specter warren ahead! || Graffiti || In-joke about Warren Spector
+
|Signage/spectre|Warning|specter warren ahead!|Graffiti (in-joke about Warren Spector)|
...
+
|Reference name||Quoted text|
|| Reference name || || Quoted texts - likely the most common way this'll be used || ||
+
|MapRegion/gatetovaultofnyx||ENTRANCE TO VAULT OF NYX|
|| MapRegion/gatetovaultofnyx || || ENTRANCE TO VAULT OF NYX || ||
+
}}</pre>
...
+
 
}}</nowiki>
+
The above displays as:
 +
{{QuoteList
 +
|Reference name|Title|Big ol' blob o' quoted texts|NPC who said that|
 +
|Signage/spectre|Warning|specter warren ahead!|Graffiti (in-joke about Warren Spector)|
 +
|Reference name||Quoted text||
 +
|MapRegion/gatetovaultofnyx||ENTRANCE TO VAULT OF NYX|
 +
}}
 +
 
 +
==ToDo==
 +
*This is pretty horrible code.
  
 
[[Category:Formatting templates]]</noinclude>
 
[[Category:Formatting templates]]</noinclude>

Latest revision as of 08:29, 15 January 2019


The purpose of this template is to provide a collapsible block of up to (at the time of writing) 20 quotes. This is a lot cheaper than calling Quote twenty times, so prevents pages complaining about "too many expensive parser calls". 3.0

Usage[edit]

Each line has four elements, with no surrounding whitespace, in this order:

  • 1 the variable reference name;
  • 2 the title;
  • 3 the quoted text (REQUIRED!);
  • 4 the speaker and/or any notes about the quote.

You should probably include at least the quoted text, and one other field.

The separators for all fields must be present, including the one at the end of the line (used to swallow the line break).

Example[edit]

{{QuoteList
|Reference name|Title|Big ol' blob o' quoted texts|NPC who said that|
|Signage/spectre|Warning|specter warren ahead!|Graffiti (in-joke about Warren Spector)|
|Reference name||Quoted text|
|MapRegion/gatetovaultofnyx||ENTRANCE TO VAULT OF NYX|
}}

The above displays as:

Quotes: 
  • Title: Big ol' blob o' quoted texts
– NPC who said that – Reference name
  • Warning: specter warren ahead!
– Graffiti (in-joke about Warren Spector) – Signage/spectre
  • Quoted text
– Reference name
  • ENTRANCE TO VAULT OF NYX
– MapRegion/gatetovaultofnyx


ToDo[edit]

  • This is pretty horrible code.