Загвар:Format columns/doc
Appearance
Энэ бол заавар, категори, эсвэл бусад мэдээлэл техникийн зориулалтаар хадгалагддаг зааврын дэд хуудас юм. Загвар хуудсыг нь үзэхийг хүсвэл, Загвар:Format columns-ийг үзнэ үү. |
Note: 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 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
[кодоор засварлах]{{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
[кодоор засварлах]Mandatory
[кодоор засварлах]- 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
[кодоор засварлах]- 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.
- title
- Text given here will appear as a title on top of the colums and headers.
- image
- 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.
- style
- formats the underlying table, eg. for a border around everything, etc.
- title_style
- formats the title
- label_style
- formats all header fields.
- label_1_style, label_2_style, etc.
- formats individual header fields.
- data_style
- 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
- image_style
- formats the table cell containing the image.
Example
[кодоор засварлах]This example shows how how {{Format columns}} works together with {{Navigation bar}} (and possibly other templates).
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
[кодоор засварлах]
See also
[кодоор засварлах]- {{Navigation bar}} - a hull where this template fits in
- {{Format rows}} - an alternative formatting option