Template:Endflatlist

From imedwiki
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

Script error: No such module "redirect hatnote".

This template provides a WCAG/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists, per WP:FLATLIST and WP:HLIST.

Usage

{{flatlist}} starts a horizontal list, such as:

This template can be used with or without {{endflatlist}}. For navigation boxes using {{navbox}}, one can set |listclass=hlist, and achieve the same styling without using this template. For image captions, list (i.e. asterisk) markup does not work, so consider using {{hlist}} instead.

Parameters

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Endflatlist

Ends a flat list created by {{flatlist}}.

Format: inline

Test of raw TemplateData output:

Ends a flat list created by {{flatlist}}.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
No parameters specified

Examples

{{flatlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}

produces:

Alternative syntax

{{startflatlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}

produces:

Syntax for ordered lists

{{flatlist|
# [[first]]
# [[second]]
# [[third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}

produces:

Using optional parameters

{{flatlist |indent=2 
|style=border:solid 1px silver; background:lightyellow; 
|class=nowraplinks |
* [[Alpine skiing at the 1936 Winter Olympics]]
* [[Alpine skiing at the 1948 Winter Olympics]]
* [[Alpine skiing at the 1952 Winter Olympics]]
* [[Alpine skiing at the 1956 Winter Olympics]]
* [[Alpine skiing at the 1960 Winter Olympics]]
* [[Alpine skiing at the 1964 Winter Olympics]]
}}

produces:

Technical details

This template uses the .hlist CSS class defined in MediaWiki:Common.css to generate horizontal lists. It causes ordinary html list items to be displayed inline (horizontally), where they would normally display as block elements (vertically). The class also generates the interpuncts between list items and parentheses around nested lists. Some of the CSS used is not compatible with all browsers, notably Internet Explorer 6 and 7.

Wikitext Expanded template HTML
{{flatlist|
* cat
* dog
* horse
* cow
* sheep
* pig
}}
Script error: No such module "LuaCall".
<div class="hlist">
<ul><li>cat</li>
<li>dog</li>
<li>horse</li>
<li>cow</li>
<li>sheep</li>
<li>pig</li></ul>
</div>

See also

Script error: No such module "navbox top and bottom".

Flat
Page Template:Mono/styles.css has no content.{{hlist}}
{{hlist|item1 |item2 |...}}

  • item1
  • item2
  • ...
Page Template:Mono/styles.css has no content.{{flatlist}}
{{flatlist|
* item1
* item2
* ...}}

  • item1
  • item2
  • ...
Page Template:Mono/styles.css has no content.{{cslist}}
{{cslist|item1 |item2 |...}}

Page Template:Cslist/styles.css has no content.Script error: No such module "Cslist".

Bulleted and Ordered
Page Template:Mono/styles.css has no content.{{bulleted list}}
{{bulleted list|item1 |item2 |...}}

  • item1
  • item2
  • ...
Page Template:Mono/styles.css has no content.{{ordered list}}
{{Ordered list|list_style_type=lower-alpha |first |second |...}}

  1. first
  2. second
  3. ...
Unbulleted
Page Template:Mono/styles.css has no content.{{unbulleted list}}
{{unbulleted list|item1 |item2 |...}}

  • item1
  • item2
  • ...
Page Template:Mono/styles.css has no content.{{plainlist}}
{{plainlist|
* item1
* item2
* ...}}

  • item1
  • item2
  • ...
Page Template:Mono/styles.css has no content.{{glossary}}
(glossary, description, definition, association)
{{glossary}}

{{term|first term}} {{defn|first description}}
{{term|second term}} {{defn|second description}}
{{term|...}} {{defn|....}}
Page Template:Mono/styles.css has no content.{{glossary end}}


first term
first description
second term
second description
...
....
Other
Page Template:Mono/styles.css has no content.{{flowlist}}
[[File:Bad Title Example.png|left|thumb|100px]]

{{flowlist|
*item1
*item2
*...}}


Bad Title Example.png
Page Template:Flowlist/styles.css has no content.
  • item1
  • item2
  • ...
Page Template:Mono/styles.css has no content.{{columns-list}}
{{columns-list|colwidth=5em|
# first
# second
# third
# ...}}

  1. first
  2. second
  3. third
  4. ...
Page Template:Mono/styles.css has no content.{{colored list}}
{{colored list|item1 |item2 |item3 |...}}

Script error: No such module "Colored list".

Script error: No such module "navbox top and bottom".

This template is based (in parts) on the Template:Endflatlist from the free encyclopedia wikipedia and is licensed under GNU license for free documentation and the Creative Commons Attribution/Share Alike. On wikipedia there is a List of authors accessible. More about importing from wikipedia on page Imedwiki:Importing from wikipedia.