Jump to content

Template:Nested Lists/doc

From The Petit Planet Wiki
Revision as of 11:45, 3 September 2026 by ReisuDesign (talk | contribs) (Created page with "{{Documentation/Header}} 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 automatically generated icons. ==Syntax== {{T|{{subst:BASEPAGENAME}}|v1=Item 1;Item 2;//Item 2.1;//Item 2.2;$$Item 2.2.1;Item 3|v2=link=1|v3=icon=Icon Furniture {item}.png|v4=icon_size=25}} * The first parameter contains the list items, separated by semicol...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 automatically generated icons.

Syntax

{{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

Basic List

{{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

{{Nested Lists|Hexia;//Dorjelang;//Yunguo;$$Red;Other Galaxy|link = 1}} yields:

With Icons

{{Nested Lists|Living;//Beds;//Seating|icon = Icon Furniture {item}.png}} yields:

  • Living
    • Beds
    • Seating

{{Nested Lists|Living;//Beds;//Seating|link = 1|icon = Icon Furniture {item}.png}} yields:

Custom Icon Size

{{Nested Lists|Living;//Beds;//Seating|icon = Icon Furniture {item}.png|icon_size = 40}} yields:

  • Living
    • Beds
    • Seating

Disabling an Icon

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

  • Living
    • Beds
    • Seating

Custom Icon

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

  • Living
    • Beds
    • Seating
      • Hexia

{{Nested Lists|Beds|Wooden Chair;Tables|Dining Table;//Tables|Small Table|link = 1}} yields:

Combining Features

{{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

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