Display a bulleted list in a table

From semantic-mediawiki.org
Jump to: navigation, search

Semantic extension(s): Semantic Forms

Further extension(s): -/-

Keyword(s): -/-

Description:

(This is actually not directly related to Semantic Forms, or Semantic MediaWiki for that matter, but it comes up from time to time as an issue when using Semantic Forms.)

If a template contains a section that looks like:

...
! Shopping list
| [[Has shopping list::{{{Shopping list|}}}
...

...and in a page that calls that template, the value for the "Shopping list" field (whether or not it was populated by a form) looks like:

* Apples
* Bananas
* Carrots

...then the first line will be displayed incorrectly: it will show up as "* Apples", instead of "Apples" after a bullet. This is because, in MediaWiki, "*" is only recognized as a bullet in a list if it is the very first thing on a line. (The same holds for "#", for numbered lists.)

The solution for this is simple: add a newline to the template, so that it instead looks like:

...
! Shopping list
|
[[Has shopping list::{{{Shopping list|}}}
...