Загвар:Format rows/doc

Энэ бол заавар, категори, эсвэл бусад мэдээлэл техникийн зориулалтаар хадгалагддаг зааврын дэд хуудас юм. Загвар хуудсыг нь үзэхийг хүсвэл, Загвар:Format rows-ийг үзнэ үү.
The contents of this template are only visible when included in
another page with parameters

↓ Skip to English language Documentation ↓

Баримт бичиг[кодоор засварлах]

xxx[кодоор засварлах]

Өгүүлбэр зүй[кодоор засварлах]

Жишээ[кодоор засварлах]

Documentation[кодоор засварлах]

This template provides a method to display content in rows, optionally each with a label to the left. There is a maximum number of 20 rows, 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[кодоор засварлах]

{{Format rows
  | label_1 = label of first row
  | data_1 = content of first row

  | label_2 = label of second row
  | data_2 = content of second row

  | label_3 = label of third row
  | data_3 = content of third row

Parameters[кодоор засварлах]

Mandatory[кодоор засварлах]

data_1, data_2, etc.
Obviously, without supplying content for at least one row, 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[кодоор засварлах]

label_1, label_2, etc.
For each data_# parameter where there als is a label_# parameter, the text given here will be shown in a label left of the data field. If no label is given, then the data field will take the full width. If you want the label be shown but empty, enter   as label text.
Text given here will appear as a title on top of everything. When embedded in another template, this usually doesn't make sense.
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[кодоор засварлах]

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 labels collectively
label_1_style, label_2_style, etc.
formats individual labels.
formats all data fields collectively
data_1_style, data_2_style, etc.
formats individual data fields.
label_even_style, label_odd_style,
data_even_style, data_odd_style
format label or data fields with even or odd numbers respectively.
formats the table cell containing the image.

Example[кодоор засварлах]

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

Source[кодоор засварлах]

{{Navigation bar
| name = xxx
| title = Navigation bar with rows
| 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 rows

  | label_1 = first row
  | data_1 = 1111 11 11

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

  | data_3 = 3 33 333 333 333 333 33333 333 3333 3 33 333 333

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

Result[кодоор засварлах]

See also[кодоор засварлах]