terminating double-brackets

[edit]

I mostly use this template inside infoboxes. When I do so, I typically put the terminating brackets on the same line as the last entrant. I've seen many edits where the inexperienced (and possibly vandalistic) editor will see the double-brackets on its own line and carelessly treat it as the end of an infobox, and I've not seen that happen when the }} accompany the last list item. I've recenly encountered several IP editors who insist on putting the brackets on their own line because the examples here show that. Are there any reasons we can't include an explanatory line at template:plainlist/doc to explain the harmlessness and potential helpfulness of my habit? Thanks, all. — Fourthords | =Λ= | 17:23, 22 July 2021 (UTC)[reply]

Technically speaking, it doesn't make a scrap of difference whether there is a newline before the closing double brace (n.b. not bracket) or not. Anybody whose only edit to the page is to add or remove such a newline (whilst making no other change), and is not making identical changes on hundreds of other pages, is a straight-up good-faith editor, and must not be treated as a vandal. Nor should you edit-war with them. --Redrose64 🌹 (talk) 10:15, 23 July 2021 (UTC)[reply]
While there's no technical difference, I've seen the extra carriage return be the cause of editors' errors with infoboxes. Basically I'm just asking whether we can add to the /doc, it doesn't make a scrap of difference whether there is a newline before the closing double brace […] or not.Fourthords | =Λ= | 19:11, 23 July 2021 (UTC)[reply]

could someone add parity with {{ubl}}? specifically around centering in tables?

[edit]

So just discovered centered lists can't be done with {{plainlist}} in tables because there's no way to set the CSS for the <ul> element generated by {{plainlist}} and the CSS for <ul> and <ol> elements is explicitly set in the "wikitable" class to be left aligned (why, I do not know):

.wikitable td ul,.wikitable td ol,.wikitable td dl {
    text-align: left

As a result, setting style="text-align:center;" for the <ul> or <ol> elements is necessary to have a list render its <li> elements centered in a cell in a table of class "wikitable" (which is most tables in Wikipedia). You can do this with {{ubl}} already:

{{ubl|list_style=text-align:center;|item 1|item 2|item 3}}

in a table cell renders as:

Header 1 Header 2 wide Header 3
cell 1
  • first item
  • second item
  • third item
cell 3

but there's no equivalent way to set the style of the <ul> element using the {{plainlist}} template:

{{plainlist|list_style=text-align:center;|
* item 1
* item 2
* item 3
}}

in a table cell renders as:

Header 1 Header 2 wide Header 3
cell 1
  • item 1
  • item 2
  • item 3
cell 3

and setting the |style= parameter in {{plainlist}} does nothing (since it is passed to the containing <div> and not the <ul> element:

{{plainlist|style=text-align:center;|
* item 1
* item 2
* item 3
}}

renders as:

Header 1 Header 2 wide Header 3
cell 1
  • item 1
  • item 2
  • item 3
cell 3

So since in the documentation we describe {{plainlist}} and {{ubl}} as pretty much equivalent other than how you format the list elements (separating elements using * and newlines vs. |), I was hoping someone could add support in {{plainlist}} for all of {{ubl}} parameters, namely:

|class     = class
|style     = style
|list_style  = style for ul tag
|item_style  = style for all li tags
|item1_style = style for first li tag |item2_style = style for second li tag |...

I would attempt to do so myself but a) I don't have template editor privileges, b) I'm not familiar with Lua, and c) I am definitely not experienced enough to be comfortable editing a template that's used on ~1% of all pages. 😅 —Joeyconnick (talk) 19:58, 25 June 2023 (UTC)[reply]

Class

[edit]

Hello

I think there is a mistake in the code for the div class.

The code is presently div class="plainlist {{{class|}}}", but shouldn't it be div class="{{{class|plainlist}}}" ?

This is probably the reason for Joeyconnick's problems in the topic above.

Kind regards,  Şÿℵדαχ₮ɘɼɾ๏ʁ 13:53, 19 May 2025 (UTC)[reply]

Why would you want to override the plainlist class? It would defeat the purpose of this template. --Redrose64 🌹 (talk) 22:45, 19 May 2025 (UTC)[reply]

Edit request 23 December 2025

[edit]

Description of suggested change: Please sync code from sandbox that adds the Module:check for unknown parameters.


Diff: (compare page here)

... </div>}}<noinclude></div> ....
+
... </div>}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using plainlist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Plainlist]] with unknown parameter "_VALUE_"|ignoreblank=y| class | style | indent | 1 }}<noinclude></div> ....

Zackmann (Talk to me/What I been doing) 01:02, 23 December 2025 (UTC)[reply]

 Done * Pppery * it has begun... 21:02, 24 December 2025 (UTC)[reply]