Help:List format

From Edge of Darkness Wiki

List format
Jump to: navigation, search

The result formats list, ol and ul are used to format query results as lists, bulleted lists, or numbered lists. The format list is the default way of formatting query results for all queries that have no additional printout statements.

Contents

Examples

Examples for plain lists

{{#ask: [[Category:Vampire]] [[Clan::Daeva]] }}

Result: Aimee Noel, Alice Brown, Allison Black, Argent, Bea, Blackbird, Bobby Lime, Cassandra Dawes, Clara E. Verne, Elle Moiraine, Gabriel Marcus, Jack Bennett, Lance Rayner, Lenny Pope, Mariel Fitzgerald, Meredin Vash, Rahyna, Regina Pia, Twist, Ume Aihara, Velma, Verity Carmen, Yuki Saito, Zoe Miller

If more printouts are given, then the format must be requested explicitly:

{{#ask: [[Category:Vampire]] [[Clan::Daeva]] 
| ?Covenant
| ?Status
| format=list
}}

Result: Aimee Noel (Covenant Invictus), Alice Brown (Covenant Invictus), Allison Black (Covenant Unaligned, Status 1), Argent (Covenant Carthian Movement), Bea (Covenant Carthian Movement), Blackbird (Covenant Ordo Dracul), Bobby Lime (Covenant Unaligned), Cassandra Dawes (Covenant Invictus), Clara E. Verne (Covenant Unaligned), Elle Moiraine (Covenant Unaligned), Gabriel Marcus (Covenant Carthian Movement), Jack Bennett (Covenant Carthian Movement), Lance Rayner (Covenant Unaligned), Lenny Pope (Covenant Carthian Movement), Mariel Fitzgerald (Covenant Lancea Sanctum), Meredin Vash (Covenant Ordo Dracul), Rahyna (Covenant Ordo Dracul), Regina Pia (Covenant Invictus), Twist (Covenant Invictus), Ume Aihara (Covenant Unaligned), Velma (Covenant Invictus), Verity Carmen (Covenant Unaligned), Yuki Saito (Covenant Invictus), Zoe Miller (Covenant Invictus)

The headers can be hidden by giving them empty labels:

{{#ask: [[Category:Vampire]] [[Clan::Daeva]] 
| ?Covenant =
| ?Status = 
| format=list
}}

Result: Aimee Noel (Invictus), Alice Brown (Invictus), Allison Black (Unaligned, 1), Argent (Carthian Movement), Bea (Carthian Movement), Blackbird (Ordo Dracul), Bobby Lime (Unaligned), Cassandra Dawes (Invictus), Clara E. Verne (Unaligned), Elle Moiraine (Unaligned), Gabriel Marcus (Carthian Movement), Jack Bennett (Carthian Movement), Lance Rayner (Unaligned), Lenny Pope (Carthian Movement), Mariel Fitzgerald (Lancea Sanctum), Meredin Vash (Ordo Dracul), Rahyna (Ordo Dracul), Regina Pia (Invictus), Twist (Invictus), Ume Aihara (Unaligned), Velma (Invictus), Verity Carmen (Unaligned), Yuki Saito (Invictus), Zoe Miller (Invictus)

The same effect is achieved by headers=hide. Another separator than «,» and the final «and» can be used if specified by sep:

{{#ask: [[Category:Vampire]] [[Clan::Daeva]] | sep =  _and_ }}

Result: Aimee Noel and Alice Brown and Allison Black and Argent and Bea and Blackbird and Bobby Lime and Cassandra Dawes and Clara E. Verne and Elle Moiraine and Gabriel Marcus and Jack Bennett and Lance Rayner and Lenny Pope and Mariel Fitzgerald and Meredin Vash and Rahyna and Regina Pia and Twist and Ume Aihara and Velma and Verity Carmen and Yuki Saito and Zoe Miller

The underscores here are used to create spaces that are not removed by MediaWiki when reading the parameter.

Examples for bulleted and numbered lists

Ordered lists are created with ol:

{{#ask: [[Category:Vampire]] [[Clan::Daeva]] 
| ?Covenant
| ?area#km² = Size in km²
| format=ol
}}

Result:

  1. Aimee Noel (Covenant Invictus)
  2. Alice Brown (Covenant Invictus)
  3. Allison Black (Covenant Unaligned)
  4. Argent (Covenant Carthian Movement)
  5. Bea (Covenant Carthian Movement)
  6. Blackbird (Covenant Ordo Dracul)
  7. Bobby Lime (Covenant Unaligned)
  8. Cassandra Dawes (Covenant Invictus)
  9. Clara E. Verne (Covenant Unaligned)
  10. Elle Moiraine (Covenant Unaligned)
  11. Gabriel Marcus (Covenant Carthian Movement)
  12. Jack Bennett (Covenant Carthian Movement)
  13. Lance Rayner (Covenant Unaligned)
  14. Lenny Pope (Covenant Carthian Movement)
  15. Mariel Fitzgerald (Covenant Lancea Sanctum)
  16. Meredin Vash (Covenant Ordo Dracul)
  17. Rahyna (Covenant Ordo Dracul)
  18. Regina Pia (Covenant Invictus)
  19. Twist (Covenant Invictus)
  20. Ume Aihara (Covenant Unaligned)
  21. Velma (Covenant Invictus)
  22. Verity Carmen (Covenant Unaligned)
  23. Yuki Saito (Covenant Invictus)
  24. Zoe Miller (Covenant Invictus)


Unordered lists are created with ul:

{{#ask: [[Category:Vampire]] [[Clan::Daeva]] 
| ?Covenant
| ?area#km² = Size in km²
| format=ul
}}

Result:


Parameters

The list formats introduce the following additional parameters:

The use of templates for formatting is explained in Help:Inline queries.

Remarks

Using the format list with templates has the advantage of having the right amount of separators (e.g. «,») between results. For example, one can have a tempalte that formats email lists that can be copied and pasted into an email client, where each entry has the form

Name of person <email@example.com>

It makes sense to set sep=,_ to have a list that uses commas for all separators instead of having the last one being an «and».

Personal tools
Namespaces
Variants
Actions
Navigation
games
Toolbox