Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Hlist: Difference between revisions

Template page
m Create Template:Hlist for horizontal middle-dot lists
m Replace reader-visible prose double hyphens with a proper em dash entity
 
Line 10: Line 10:
<pre>{{Hlist|Alice|Bob|Carol|stacked=yes}}</pre>
<pre>{{Hlist|Alice|Bob|Carol|stacked=yes}}</pre>


Add <code>count=yes</code> to render just the number of non-empty items instead of the list -- call it with the exact same positional arguments as the real list so the count can never drift out of sync with it:
Add <code>count=yes</code> to render just the number of non-empty items instead of the list &mdash; call it with the exact same positional arguments as the real list so the count can never drift out of sync with it:


<pre>{{Hlist|Alice|Bob|Carol|count=yes}}</pre>
<pre>{{Hlist|Alice|Bob|Carol|count=yes}}</pre>

Latest revision as of 14:20, 23 August 2026

Usage

{{Hlist|Alice|Bob|Carol}}

renders as:

  • ·Alice
  • ·Bob
  • ·Carol

Up to 20 unnamed parameters, each becoming one list item, separated by a middle dot (·). Add stacked=yes to put one item per line instead:

{{Hlist|Alice|Bob|Carol|stacked=yes}}

Add count=yes to render just the number of non-empty items instead of the list — call it with the exact same positional arguments as the real list so the count can never drift out of sync with it:

{{Hlist|Alice|Bob|Carol|count=yes}}

renders as: 3

Contents