Modul:List/doc
{{#switch:
{{#if:
|
| {{#ifeq:Модул|Модул
| module
| other
}}
}}
| module =
{{#switch: beta
| pre-alpha | prealpha | pa =}} | {{#switch: beta
| pre-alpha | prealpha | pa = Овај модул је оцењен као pre-alpha. Незавршен је и постоји могућност да је у активном развоју. Не би требало да га се користи на страницама именског простора чланак. Модули остају pre-alpha све док оригинални уредник (или неко ко преузме уређивање ако је оно запостављено одређено време) не буде задовољан основном структуром.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | alpha | a = Овај модул је оцењен као alpha. Спреман је за унос од стране трећег лица и може да буде коришћен на неколико страница да би се увиделе евентуалне грешке и проблеми; за то време треба да се надзире. Предлози за нове функције или промене у механизму уноса и исписа су добродошли.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | beta | b = Овај модул је оцењен као beta и спреман је за широку употребу. Још увек је нов и треба да га се користи са дозом опреза да би се осигурали очекивани резултати.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | release | r | general | g = Овај модул је оцењен као спреман за генералну употребу. Досегао је зрео облик и сматра се да нема никаквих багова те да га се може употребити где год је то потребно. Спреман је за помињање на помоћним страницама и другим Википедијиним изворима као опција за нове кориснике који почињу да уче. Да би се смањило оптерећење сервера и лош излаз података, треба да се побољшава тестирањима у песку, а не константним пуњењем историје покушавајући постићи жељене промене.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | protected | protect | p = Овај модул је предмет заштите страница. То је веома коришћен модул у употреби огромног броја страница или се супституише веома често. Због вандализма или грешака које би утицале на много страница или тривијалног уређивања које би могло да изазове проблеме на серверима, модул је заштићен од уређивања.{{#switch: doc|doc|sandbox= | {{#ifeq: | true | | }} }} | #default = Ознака модула је неважећа или није наведена.}} |
| other | #default = Ovaj šablon treba da bude korišćen na stranicama imenskog prostora „Modul”. }}
Ovaj {{
|Modul=Lua modul |#default=šablon }} se koristi na {{#if:170,000+|170,000+|veoma velikom broju}} stranica, tako da će promene na njemu biti široko primećene. Molimo da bilo kakve izmene testirate na podstranicama {{
|Modul=modula |#default=šablona }} [[{{
| doc | sandbox | dok | pesak = Modul:List | #default = Modul:List/doc }}/pesak|/pesak]] ili [[{{
| doc | sandbox | dok | pesak = Modul:List | #default = Modul:List/doc }}/testovi|/testovi]]{{
|Modul=. |#default=, ili na sopstvenoj korisničkoj podstranici. }} Razmislite i o postavljanju rasprave o promenama koje nameravate da unesete na {{#if:|stranici [[{{{2}}}]]|[[{{#switch: doc | doc | sandbox | dok | pesak = Razgovor o modulu:List | #default = Razgovor o modulu:List/doc }}|stranici za razgovor]]}} pre njihovog primenjivanja. |
This module outputs various kinds of lists. At present, it supports bulleted lists, unbulleted lists, horizontal lists, ordered lists (numbered or alphabetical), and horizontal ordered lists. It allows for easy css styling of the list or of the individual list items.
Usage
- Quick usage
{{#switch:{{{2}}}|nowiki|nw={{{3}}}|{{{2}}}}}|white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">{{#switch:{{#invoke:list|function|first item|second item|third item|...}}|nowiki|nw={{{2}}}|{{#invoke:list|function|first item|second item|third item|...}}}} }}
- All parameters
{{#switch:{{{2}}}|nowiki|nw={{{3}}}|{{{2}}}}}|white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">{{#switch:
{{#invoke:list|function
|first item|second item|third item|...
|start = start number for ordered lists
|type = type of numbering for ordered lists
|list_style_type = type of marker for ordered lists (uses CSS)
|class = class
|style = style
|list_style = style for the list
|item_style = style for all list items
|item1_style = style for the first list item |item2_style = style for the second list item |...
|item1_value = value for the first list item |item2_value = value for the second list item |...
|indent = indent for horizontal lists
}}
|nowiki|nw={{{2}}}|
{{#invoke:list|function
|first item|second item|third item|...
|start = start number for ordered lists
|type = type of numbering for ordered lists
|list_style_type = type of marker for ordered lists (uses CSS)
|class = class
|style = style
|list_style = style for the list
|item_style = style for all list items
|item1_style = style for the first list item |item2_style = style for the second list item |...
|item1_value = value for the first list item |item2_value = value for the second list item |...
|indent = indent for horizontal lists
}}
}} }}
- Arguments passed from parent template
{{#switch:{{{2}}}|nowiki|nw={{{3}}}|{{{2}}}}}|white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;">{{#switch:{{#invoke:list|function}}|nowiki|nw={{{2}}}|{{#invoke:list|function}}}} }}
- Functions
| Function name | Produces | Example output | Template using the function |
|---|---|---|---|
bulleted
|
Bulleted lists |
|
zameni:}}bulleted list{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} |
unbulleted
|
Unbulleted lists |
|
zameni:}}unbulleted list{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} |
horizontal
|
Horizontal bulleted lists |
|
zameni:}}hlist{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} |
ordered
|
Ordered lists (numbered lists and alphabetical lists) |
|
zameni:}}ordered list{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}} |
horizontal_ordered
|
Horizontal ordered lists |
|
Parameters
- Positional parameters (
1,2,3...) - these are the list items. If no list items are present, the module will output nothing. start- sets the start item for ordered lists. This can be a start number for numbered lists, or a start letter for alphabetical lists. Horizontal ordered lists only support numbers.type- the type of marker used in ordered lists. Possible values are "1" for numbers (the default), "A" for uppercase letters, "a" for lowercase letters, "I" for uppercase Roman numerals, and "i" for lowercase Roman numerals. Not supported in horizontal ordered lists. See also thelist_style_typeparameter.list_style_type- the type of marker used in ordered lists. This uses CSS styling, and has more types available than thetypeparameter, which uses an html attribute. Possible values are listed at W3schools' list-style-type page. Support may vary by browser.list-style-typeis an alias for this parameter.class- a custom class for the{{#switch:pair
|c|close =
|s|single
|o|open
|p|pair = <div{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:pair
|s|single
|o|open =
|c|close
|p|pair = </div>
}} tags surrounding the list, e.g. plainlinks.
style- a custom css style for the{{#switch:pair
|c|close =
|s|single
|o|open
|p|pair = <div{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:pair
|s|single
|o|open =
|c|close
|p|pair = </div>
}} tags surrounding the list, e.g. font-size: 90%;.
list_style- a custom css style for the list itself. The format is the same as for the|{{SAFESUBST:#if:style|style=}}parameter.item_style- a custom css style for all of the list items (the{{#switch:pair
|c|close =
|s|single
|o|open
|p|pair = <li{{#if:| {{{params}}}}}
}}{{#switch:pair
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:pair
|s|single
|o|open =
|c|close
|p|pair = </li>
}} tags). The format is the same as for the |{{SAFESUBST:#if:style|style=}} parameter.
item1_style,item2_style,item3_style... - custom css styles for each of the list items. The format is the same as for the|{{SAFESUBST:#if:style|style=}}parameter.item1_value,item2_value,item3_value... - custom value for the given list item. List items following the one given will increment from the specified value. The value should be a positive integer. (Note that this option only has an effect on ordered lists.)indent- this parameter indents the list, for horizontal and horizontal ordered lists only. The value must be a number, e.g.2. The indent is calculated in em, and is 1.6 times the value specified. If no indent is specified, the default is zero.
Examples
- Bulleted lists
| Code | Result |
|---|---|
{{#invoke:list|bulleted|First item|Second item|Third item}}
|
|
{{#invoke:list|bulleted|First item|Second item|Third item|item_style=color:blue;}}
|
|
{{#invoke:list|bulleted|First item|Second item|Third item|item1_style=background-color:yellow;|item2_style=background-color:silver;}}
|
|
- Unbulleted lists
| Code | Result |
|---|---|
{{#invoke:list|unbulleted|First item|Second item|Third item}}
|
|
{{#invoke:list|unbulleted|First item|Second item|Third item|item_style=color:blue;}}
|
|
{{#invoke:list|unbulleted|First item|Second item|Third item|item1_style=background-color:yellow;|item2_style=background-color:silver;}}
|
|
- Horizontal lists
| Code | Result |
|---|---|
{{#invoke:list|horizontal|First item|Second item|Third item}}
|
|
{{#invoke:list|horizontal|First item|Second item|Third item|indent=2}}
|
|
- Unbulleted lists
| Code | Result |
|---|---|
{{#invoke:list|unbulleted|First item|Second item|Third item}}
|
|
{{#invoke:list|unbulleted|First item|Second item|Third item|item_style=color:blue;}}
|
|
{{#invoke:list|unbulleted|First item|Second item|Third item|item1_style=background-color:yellow;|item2_style=background-color:silver;}}
|
|
- Ordered lists
| Code | Result |
|---|---|
{{#invoke:list|ordered|First item|Second item|Third item}}
|
|
{{#invoke:list|ordered|First item|Second item|Third item|start=3}}
|
|
{{#invoke:list|ordered|First item|Second item|Third item|type=i}
|
|
{{#invoke:list|ordered|First item|Second item|Third item|list_style_type=lower-greek}}
|
|
- Horizontal ordered lists
| Code | Result |
|---|---|
{{#invoke:list|horizontal_ordered|First item|Second item|Third item}}
|
|
{{#invoke:list|horizontal_ordered|First item|Second item|Third item|start=3}}
|
|
{{#invoke:list|horizontal_ordered|First item|Second item|Third item|indent=2}}
|
|
Tracking/maintenance category
See also