Template:Hlist
From Guild Wars 2 Wiki
Jump to navigationJump to search
Usage[edit]
This template can be used to create horizontal lists with bullet-separated items from a list of comma-separated values.
{{hlist|item 1, item 2, item 3, ...}}
The result is a nice, semantic, WCAG-compliant, unordered HTML list, which can be styled with CSS.
Parameters[edit]
- 1 (unnamed parameter)
- The list content, i.e. comma-separated values.
- delim
- Optional. Can be set to overwrite the default
,
delimiter. - class
- Optional. One or more additional HTML classes for the wrapping div. For example
plainlinks
can be used to suppress any external link icons in the list. - style
- Optional. Arbitrary inline styles for the wrapping div.
Examples[edit]
- Standard usage
{{hlist|[[Iron Sword]], [[Darksteel Sword]], [[Mithril Sword]]}}
- Using a custom separator
{{hlist|[[Quaggan]]s and [[Dolyak]]s and [[Choya]]|delim=and}}
- Using inline styles
{{hlist|{{asura}},{{charr}},{{human}},{{norn}},{{sylvari}}|style=display: inline-block; padding: 0.5em; background: #DDF; border: 1px solid #66D;}}
Notes[edit]
- This template works similar to Wikipedia's Hlist, the main difference being that the Wikipedia template has list items passed as separate template arguments instead of comma-separated values. The different implementation is due to the lack of the Scribunto/LUA extension on the Guild Wars 2 Wiki, which would be required to handle an arbitrary number of unnamed template parameters.