Template:Flatlist/doc: Difference between revisions
More actions
imported>76561198045853337 Created page with "'''<nowiki>{{flatlist}}</nowiki>''' creates a horizontal list of items separated by middots ( · ), for example: {{flatlist| * Iron Ore * Coal * Stone }} It's han..." |
(No difference)
|
Latest revision as of 12:55, 31 May 2021
{{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| * [[Iron Ore]] * [[Coal]] * [[Stone]] }}
produces:
For a numbered list:
{{flatlist| # [[Iron Ore]] # [[Coal]] # [[Stone]] }}
produces:
If you need to add a break in the line, add a break physically into the code like this:
{{flatlist| * [[Iron Ore]] * [[Coal]] * [[Stone]] }}
produces:
If you want to add parentheses like a subcategory without actually creating a new subcategory, use nesting like this:
{{flatlist| * [[Iron Ore]] ** [[Coal]] ** [[Stone]] }}
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
The template and its documentation are based on code imported from the Doom Wiki, released under CC-BY-SA license.