Template:Nested Lists/doc: Difference between revisions
ReisuDesign (talk | contribs) No edit summary |
m New Categorization, replaced: Living → Basic Furniture (5) |
||
| Line 27: | Line 27: | ||
===With Icons=== | ===With Icons=== | ||
{{T|Nested Lists|p1= | {{T|Nested Lists|p1=Basic Furniture;//Beds;//Seating|p2=icon=Icon Furniture {item}.png|_Y_=1}} | ||
===With Links and Icons=== | ===With Links and Icons=== | ||
{{T|Nested Lists|p1= | {{T|Nested Lists|p1=Basic Furniture;//Beds;//Seating|p2=link=1|p3=icon=Icon Furniture {item}.png|_Y_=1}} | ||
===Custom Icon Size=== | ===Custom Icon Size=== | ||
{{T|Nested Lists|p1= | {{T|Nested Lists|p1=Basic Furniture;//Beds;//Seating|p2=icon=Icon Furniture {item}.png|p3=icon_size=40|_Y_=1}} | ||
===Disabling an Icon=== | ===Disabling an Icon=== | ||
{{T|Nested Lists|p1= | {{T|Nested Lists|p1=Basic Furniture;//[no]Beds;//Seating|p2=icon=Icon Furniture {item}.png|_Y_=1}} | ||
===Custom Icon=== | ===Custom Icon=== | ||
{{T|Nested Lists|p1= | {{T|Nested Lists|p1=Basic Furniture;//Beds;//Seating;$$[Hexia Icon.png]Hexia|_Y_=1}} | ||
===Custom Link Labels=== | ===Custom Link Labels=== | ||
Latest revision as of 12:04, 20 September 2026
This is the documentation page for Nested Lists. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
This template creates a nested list from a semicolon-separated input, with different symbols used to specify the indentation level. It can optionally link items to existing pages and display icons given a specific file name format or custom image file name.
Syntax
[edit source]{{Nested Lists|Item 1;Item 2;//Item 2.1;//Item 2.2;$$Item 2.2.1;Item 3|link = 1|icon = Icon Furniture {item}.png|icon_size = 25}}
- The first parameter contains the list items, separated by semicolons ;.
- The indentation of each item is determined by the symbol immediately before it:
- ; — level 0
- // — level 1
- $$ — level 2
- %% — level 3
- && — level 4
- link=1 checks whether each item's page exists and links the item when it does.
- icon= adds an icon to every item. {item} is replaced with the item's page name.
- icon_size= sets the icon size in pixels. The default is 25.
- [no] at the beginning of an item disables its icon.
- [custom icon] at the beginning of an item disables its icon.
- An item can use page{{!}}label to specify a page separately from its displayed label.
Examples
[edit source]Basic List
[edit source]{{Nested Lists|Item 1;Item 2;//Item 2.1;//Item 2.2;$$Item 2.2.1;Item 3}} yields:
- Item 1
- Item 2
- Item 2.1
- Item 2.2
- Item 2.2.1
- Item 3
With Links
[edit source]{{Nested Lists|Hexia;//Dorjelang;//Yunguo;$$Red;Other Galaxy|link = 1}} yields:
With Icons
[edit source]{{Nested Lists|Basic Furniture;//Beds;//Seating|icon = Icon Furniture {item}.png}} yields:
With Links and Icons
[edit source]{{Nested Lists|Basic Furniture;//Beds;//Seating|link = 1|icon = Icon Furniture {item}.png}} yields:
Custom Icon Size
[edit source]{{Nested Lists|Basic Furniture;//Beds;//Seating|icon = Icon Furniture {item}.png|icon_size = 40}} yields:
Disabling an Icon
[edit source]{{Nested Lists|Basic Furniture;//[no]Beds;//Seating|icon = Icon Furniture {item}.png}} yields:
Custom Icon
[edit source]{{Nested Lists|Basic Furniture;//Beds;//Seating;$$[Hexia Icon.png]Hexia}} yields:
Custom Link Labels
[edit source]{{Nested Lists|Beds|Wooden Chair;Tables|Dining Table;//Tables|Small Table|link = 1}} yields:
Combining Features
[edit source]{{Nested Lists|[no]Furniture;Seating|Wooden Chair;//Tables|Dining Table;$$[no]Lamp|Desk Lamp;%%[no]Special Item|link = 1|icon = Icon Furniture {item}.png|icon_size = 30}} yields:
- Furniture
Wooden Chair
Dining Table
- Desk Lamp
- Special Item
- Desk Lamp
Template Data
[edit source]Creates a nested list from a semicolon-separated input. The symbols //, $$, %%, and && specify indentation levels. Items can optionally be linked to existing pages and given automatically generated icons.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| List | 1 | Semicolon-separated list of items. Use //, $$, %%, or && before an item to set its indentation level. | String | required |
| Link | link | If set to 1, checks whether each item's page exists and links the item when it does.
| Boolean | optional |
| Icon | icon | Icon filename format to use for every item. Use {item} as a placeholder for the item's page name. | String | optional |
| Icon size | icon_size | Size of the icons in pixels. Defaults to 25.
| Number | optional |