Template:Flatlist/doc

From MediaWiki
Jump to navigation Jump to search

{{flatlist}} creates a horizontal list of items separated by middots ( · ), for example:

It's handy inside navboxes to format the link lists and is a much better alternative to using the middot template as using too many templates on one page can cause the browser to crash.

Usage

{{flatlist|
* [[V (character)|V]]
* [[Jackie Welles]]
* [[Dexter DeShawn]]
}}

produces:

For a numbered list:

{{flatlist|
# [[V (character)|V]]
# [[Jackie Welles]]
# [[Dexter DeShawn]]
}}

produces:

If you need to add a break in the line, add a break physically into the code like this:

{{flatlist|
* [[V (character)|V]]

* [[Jackie Welles]]
* [[Dexter DeShawn]]
}}

produces:

If you want to add parentheses like a subcategory without actually creating a new subcategory, use nesting like this:

{{flatlist|
* [[V (character)|V]]
** [[Jackie Welles]]
** [[Dexter DeShawn]]
}}

produces:

Dependencies

Code has been added to the MediaWiki:Common.css page to ensure this works (known as 'Hlist'). This code has been pulled from the following source (which was updated as of Aug. 10, 2016):

https://www.mediawiki.org/wiki/Snippets/Horizontal_lists

Technical Info

This template is a copy of Wikipedia's {{flatlist}}, except it doesn't support the alternative syntax {{startflatlist}} … {{endflatlist}}.