Jump to content

Template:Nested Lists/doc: Difference between revisions

From The Petit Planet Wiki
ReisuDesign (talk | contribs)
No edit summary
ShirraBot (talk | contribs)
m New Categorization, replaced: Living → Basic Furniture (5)
 
Line 27: Line 27:


===With Icons===
===With Icons===
{{T|Nested Lists|p1=Living;//Beds;//Seating|p2=icon=Icon Furniture {item}.png|_Y_=1}}
{{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=Living;//Beds;//Seating|p2=link=1|p3=icon=Icon Furniture {item}.png|_Y_=1}}
{{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=Living;//Beds;//Seating|p2=icon=Icon Furniture {item}.png|p3=icon_size=40|_Y_=1}}
{{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=Living;//[no]Beds;//Seating|p2=icon=Icon Furniture {item}.png|_Y_=1}}
{{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=Living;//Beds;//Seating;$$[Hexia Icon.png]Hexia|_Y_=1}}
{{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.

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
[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:

  • Basic Furniture
    • Beds
    • Seating
[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:

  • Basic Furniture
    • Beds
    • Seating

Disabling an Icon

[edit source]

{{Nested Lists|Basic Furniture;//[no]Beds;//Seating|icon = Icon Furniture {item}.png}} yields:

  • Basic Furniture
    • Beds
    • Seating

Custom Icon

[edit source]

{{Nested Lists|Basic Furniture;//Beds;//Seating;$$[Hexia Icon.png]Hexia}} yields:

  • Basic Furniture
    • Beds
    • Seating
      • Hexia
[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:

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.

Template parameters

ParameterDescriptionTypeStatus
List1

Semicolon-separated list of items. Use //, $$, %%, or && before an item to set its indentation level.

Stringrequired
Linklink

If set to 1, checks whether each item's page exists and links the item when it does.

Default
0
Booleanoptional
Iconicon

Icon filename format to use for every item. Use {item} as a placeholder for the item's page name.

Stringoptional
Icon sizeicon_size

Size of the icons in pixels. Defaults to 25.

Default
25
Numberoptional