Difference between revisions of "Template:QuoteList"

From UnderWiki
Jump to navigation Jump to search
(Finished I think.)
(fix float... I don't like this fix.)
Line 1: Line 1:
<includeonly>Quotes: <div class="mw-collapsible  mw-collapsed">
+
<includeonly><div style="float:left">Quotes:&nbsp;</div><div class="mw-collapsible  mw-collapsed" style="float:left">
 
*{{#if:{{{2|}}}|{{{2|}}}:&nbsp;|}}<b>{{{3|}}}</b>
 
*{{#if:{{{2|}}}|{{{2|}}}:&nbsp;|}}<b>{{{3|}}}</b>
 
::<i>{{#if:{{{4|}}}| – {{#ifexist:{{{4|}}}|[[{{{4|}}}]]|{{{4|}}}}}|}} {{#if:{{{1|}}}| – {{{1|}}} |}}</i>
 
::<i>{{#if:{{{4|}}}| – {{#ifexist:{{{4|}}}|[[{{{4|}}}]]|{{{4|}}}}}|}} {{#if:{{{1|}}}| – {{{1|}}} |}}</i>
Line 78: Line 78:
 
::<i>{{#if:{{{99|}}}| – {{#ifexist:{{{99|}}}|[[{{{99|}}}]]|{{{99|}}}}}|}} {{#if:{{{96|}}}| – {{{96|}}} |}}</i>
 
::<i>{{#if:{{{99|}}}| – {{#ifexist:{{{99|}}}|[[{{{99|}}}]]|{{{99|}}}}}|}} {{#if:{{{96|}}}| – {{{96|}}} |}}</i>
 
|}}
 
|}}
</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".
Line 109: Line 109:
  
 
==ToDo==
 
==ToDo==
This is pretty horrible. The expand tag floats right. Everything's unfriendly.
+
This is pretty horrible code.
  
 
[[Category:Formatting templates]]</noinclude>
 
[[Category:Formatting templates]]</noinclude>

Revision as of 22:49, 14 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

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 test, 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

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

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

This is pretty horrible code.