Загвар:Format columns

Чөлөөт нэвтэрхий толь — Википедиагаас
Jump to navigation Jump to search
This template documentation is transcluded from Загвар:Format columns/doc [edit]
The contents of this template are only visible when included
in another page with parameters.

↓ Skip to English language Documentation ↓

Баримт бичиг[edit source]

xxx[edit source]

Өгүүлбэр зүй[edit source]

Жишээ[edit source]

Documentation[edit source]

This template provides a method to display content in columns, optionally with a header each. There is a maximum number of 10 columns, any input with higher numbers will be ignored.

One of the purposes of this template is to be used within other templates, such as in the body area of {{Navigation bar}}.

Syntax[edit source]

{{Format columns
  | label_1 = heading of first column
  | data_1 = content of first column

  | label_2 = heading of second column
  | data_2 = content of second column

  | label_3 = heading of third column
  | data_3 = content of third column

Parameters[edit source]

Mandatory[edit source]

data_1, data_2, etc. 
Obviously, without supplying content for at least two columns, using this template doesn't make sense. The content can be anything, but pipe characters must be escaped by {{!}} and friends, or they may confuse the wiki parser.

Optional[edit source]

label_1, label_2, etc. 
If at least one of the heading parameters is set, then headers will be placed at the top of all columns. Supplying either column content or a column header will generate the respective column. If only one of the two is specified for a column, then the other field will be empty.
Text given here will appear as a title on top of the colums and headers.
A full image link given here will be displayed to the right of the data fields in a seperate area. The data_1 entry must be present for this to work. Adding images to navbars is not recommended though, because in most cases the available space is already limited enough.

Styles[edit source]

Elements can be styled collectively or individually. Style arguments should be used sparingly, as the defaults may already provide for an acceptable look. Especially when embedded in other templates, the formatting should be kept to an absolute minimum.

formats the underlying table, eg. for a border around everything, etc.
formats the title
formats all header fields.
label_1_style, label_2_style, etc. 
formats individual header fields.
formats all data fields.
data_1_style, data_2_style, etc. 
formats individual data fields.
label_even_style, label_odd_style,
data_even_style, data_odd_style 
formats label or data fields with even or odd numbers respectively.
label_row_style, data_row_style 
Formats the table row holding either the label or the data fields
formats the table cell containing the image.

Example[edit source]

This example shows how how {{Format columns}} works together with {{Navigation bar}} (and possibly other templates).

Source[edit source]

{{Navigation bar
| name = Format_columns/doc
| title = Navigation bar with columns
| icon_right = [[Image:Flag of Mongolia.svg|40px]]
| above = a field above the content (belonging to {{Template|Navigation bar}})
| below = a field below the content (belonging to {{Template|Navigation bar}})
| body ={{Format columns

  | label_1 = first column
  | data_1 = 1111 11 11

  | label_2 = second column
  | data_2 = 
* 2 22 222 222 2
* 2 22 
* 222 222 2 22
* 222 222 2 22 222 

  | label_3 = third column
  | data_3 = 3 33 333 333 3
33 333 33
3 33 333 3333 3 33 333 333

  | label_4 = fourth column
  | data_4 = 
#4444 4 44
#44 4 44
#44 4 44444 
#44 4 44

Result[edit source]

See also[edit source]