Difference between revisions of "Template:Br separated entries/doc"

From blackwiki
Jump to navigation Jump to search
imported>102orion
m (add korean interwiki)
imported>Uzume
(→‎top: Template:Unbulleted list is closer with similar argument list)
 
(35 intermediate revisions by 20 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
{{High-risk|630,000+}}
{{shortcut|Template:br list}}
+
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
This template is used primarily in infoboxes to create a <code>&lt;br /&gt;</code> delimited collection of items, with up to three entries, only adding the <code>&lt;br /&gt;</code> tags where needed.
+
{{Template shortcut |br list}}
 +
{{stack|{{Lua|Module:Separated entries}}}}
  
'''Note:''' For lists of items, without bullets, do not use this template, but use {{tl|plainlist}} instead, for better [[WP:ACCESS|accessibility]].
+
This template is used primarily in infoboxes to create a <code>&lt;br /&gt;</code> delimited collection of items, only adding the <code>&lt;br /&gt;</code> tags where needed.
 +
 
 +
'''Note:''' For lists of items, without bullets, do not use this template, but use {{tl|unbulleted list}} or {{tl|plainlist}} instead, for better [[WP:ACCESS|accessibility]].
  
 
== Usage ==
 
== Usage ==
:<code><nowiki>{{br separated entries|entry1|entry2|entry3}}</nowiki></code>
+
:<code><nowiki>{{br separated entries|entry1|entry2|entry3|entry4|entry5|...}}</nowiki></code>
  
 
== Example ==
 
== Example ==
Line 28: Line 31:
 
|-
 
|-
 
| <code><nowiki>{{br separated entries| | | }}</nowiki></code> || {{br separated entries| | | }}
 
| <code><nowiki>{{br separated entries| | | }}</nowiki></code> || {{br separated entries| | | }}
 +
|-
 +
| <code><nowiki>{{br separated entries|entry1|entry2|entry3|entry4|entry5|entry6}}</nowiki></code> || {{br separated entries|entry1|entry2|entry3|entry4|entry5|entry6}}
 
|}
 
|}
  
== Nesting ==
+
===Template data===
For more than three entries, this template can be nested, although excessive nesting is discouraged due to template transclusion depth limits imposed by the server.
+
{{TemplateDataHeader}}
{| class="wikitable"
+
<templatedata>{
! Code !! Result
+
"description": "Creates a <br /> delimited collection of items. Primarily for use in infoboxes, it only adds the <br /> tags where needed. ",
|-
+
"params": {
| <code><nowiki>{{br separated entries|entry1|entry2|{{br separated entries|entry3|entry4|entry5}}}}</nowiki></code> || {{br separated entries|entry1|entry2|{{br separated entries|entry3|entry4|entry5}}}}
+
  "1": {
|-
+
    "label": "First item",
| <code><nowiki>{{br separated entries|entry1|entry2|{{br separated entries|entry3|entry4|}}}}</nowiki></code> || {{br separated entries|entry1|entry2|{{br separated entries|entry3|entry4|}}}}
+
    "description": "First item, may be null",
|-
+
    "type": "string",
| <code><nowiki>{{br separated entries|entry1|entry2|{{br separated entries|entry3||entry5}}}}</nowiki></code> || {{br separated entries|entry1|entry2|{{br separated entries|entry3||entry5}}}}
+
    "required": false
|-
+
  },
| <code><nowiki>{{br separated entries|entry1|entry2|{{br separated entries||entry4|entry5}}}}</nowiki></code> || {{br separated entries|entry1|entry2|{{br separated entries||entry4|entry5}}}}
+
  "2": {
|-
+
    "label": "Second item",
| <code><nowiki>{{br separated entries|entry1||{{br separated entries|entry3|entry4|entry5}}}}</nowiki></code> || {{br separated entries|entry1||{{br separated entries|entry3|entry4|entry5}}}}
+
    "description": "Second item, many more items can be added",
|-
+
    "type": "string",
| <code><nowiki>{{br separated entries||entry2|{{br separated entries|entry3|entry4|entry5}}}}</nowiki></code> || {{br separated entries||entry2|{{br separated entries|entry3|entry4|entry5}}}}
+
    "required": false
|}
+
  }
 +
}}</templatedata>
  
 
== See also ==
 
== See also ==
 +
* {{tl|comma separated entries}}
 +
* {{tl|space separated entries}}
 
* {{tl|plainlist}}
 
* {{tl|plainlist}}
 
* {{tl|flatlist}}
 
* {{tl|flatlist}}
 
* {{tl|pagelist}}
 
* {{tl|pagelist}}
* {{tl|nowrap begin}}/{{tl|nowrap end}}
 
 
* {{tl|multi-column numbered list}}
 
* {{tl|multi-column numbered list}}
 +
* {{tl|unbulleted list}}
 +
* [[Module:separated entries]], the [[Wikipedia:Lua|Lua]] module on which this template is based.
  
<includeonly>
+
<includeonly>{{Sandbox other|
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
| <!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:Wikipedia formatting and function templates]]
+
[[Category:List formatting and function templates]]
 
+
}}</includeonly>
[[fa:الگو:Br separated entries]]
 
[[ja:Template:Br separated entries]]
 
[[ka:თარგი:Br separated entries]]
 
[[ko:Br 분리 기입]]
 
[[tr:Şablon:Br separated entries]]
 
[[ur:Template:Br separated entries]]
 
</includeonly>
 

Latest revision as of 05:39, 22 June 2020

This template is used primarily in infoboxes to create a <br /> delimited collection of items, only adding the <br /> tags where needed.

Note: For lists of items, without bullets, do not use this template, but use {{unbulleted list}} or {{plainlist}} instead, for better accessibility.

Usage

{{br separated entries|entry1|entry2|entry3|entry4|entry5|...}}

Example

Code Result
{{br separated entries|entry1|entry2|entry3}} entry1
entry2
entry3
{{br separated entries| |entry2|entry3}} entry2
entry3
{{br separated entries|entry1| |entry3}} entry1
entry3
{{br separated entries|entry1|entry2| }} entry1
entry2
{{br separated entries|entry1| | }} entry1
{{br separated entries| |entry2| }} entry2
{{br separated entries| | |entry3}} entry3
{{br separated entries| | | }}
{{br separated entries|entry1|entry2|entry3|entry4|entry5|entry6}} entry1
entry2
entry3
entry4
entry5
entry6

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Br separated entries

Creates a <br /> delimited collection of items. Primarily for use in infoboxes, it only adds the <br /> tags where needed.

Template parameters

ParameterDescriptionTypeStatus
First item1

First item, may be null

Stringoptional
Second item2

Second item, many more items can be added

Stringoptional

See also