Module:NavboxBuilder

From Tempest Rising Wiki
Jump to navigation Jump to search

Below is the list of all available parameters. At least one list is required for the navbox to show up. Apart from that, all other parameters are optional.

Main

  • title – main title of the navbox.
  • links – links that appear on left side of the title bar.
    • You can put any wikisyntax here.
    • title is required for it to work.
  • state – should the navbox be collapsed or expanded by default
    • Values: collapsed or expanded (case insensitive)
    • Empty or unrecognized values will disable collapsing.
    • title is required for it to work
  • above and below – fields above and below sections and images.
  • left_image and right_image – fields beside sections, most commonly used to add images.
    • You can put any content here, not only images.

Sections

Sections include all lists with the same or higher number up to the next section.

  • header_n – heading of a section
    • n – any positive integer
    • Requires at least one list to be included to show up
  • state_n – should the section be collapsed or expanded by default
    • n – number of an existing header
    • Values: collapsed or expanded (case insensitive)
    • Empty or unrecognized values will disable collapsing.
  • header_state – same as above, but affects all headers
    • Values: collapsed or expanded (case insensitive)
    • Empty or unrecognized values will disable collapsing.
    • Can be overridden by state_n
  • layout_n – selects layout for that section
    • n – any positive integer
    • Can be used without header_n to create a separate section without a header
    • Values: table or horizontal (case insensitive)
    • Empty or unrecognized values will use default (table).

Table layout (table)

Standard layout with lists and sublists.

  • left_image_n and right_image_n – fields beside sections lists in that section, most commonly used to add images.
    • n – number of an existing header
    • You can put any content here, not only images.

Horizontal layout (horizontal)

Horizontal layout with lists forming columns. Sublists are not supported and will be treated as regular lists.

  • per_row_n – maximum number of lists per row.
    • n – number of an existing section.
    • Value: any number above 1.
    • Number of columns is still limited by space needed. You can't go higher than flexbox allows.
  • span_n – how many columns should the list span.
    • n – number of an existing list.
    • Value: any number between 0 and corresponding per_row_n

Lists

  • list_n – single row with a list of links
    • n – any positive integer
  • group_n – heading of a list
    • n – number of an existing list or sublist

Sublists will appear as sub entries of the group with same n.

  • list_n_m – single row with a list of links
    • n and m – any positive integers
  • group_n_m – heading of a sublist
    • n and m – numbers of an existing sublist

Styling

  • navbox_class and navbox_style – applied to the main navbox element
  • title_class and title_style – applied to the title bar
  • base_class and base_style – applied to all groups, subgroups, headers, above and below fields
  • above_class and above_style – applied to the above field
  • below_class and below_style – applied to the below field
  • image_class and image_style – applied to all image fields
  • left_image_class and left_image_style – applied to the main left image field
  • right_image_class and right_image_style – applied to the main right image field
  • header_class and header_style – applied to all headers
  • header_n_class and header_n_style – applied to the header specified with n
  • left_image_n_class and left_image_n_style – applied to the left image field in the section specified with n
  • right_image_n_class and right_image_n_style – applied to the right image field in the section specified with n
  • group_class and group_style – applied to all groups
  • subgroup_class and subgroup_style – applied to all subgroups
  • group_n_class and group_n_style – applied to the group specified with n
  • group_n_m_class and group_n_m_style – applied to the subgroup specified with n and m
  • list_class and list_style – applied to all lists
  • list_n_class and list_n_style – applied to the list specified with n
  • list_n_m_class and list_n_m_style – applied to the list specified with n and m

return require('Dev:NavboxBuilder').changeParameters{
    -- Settings
    links = 'links',
    state = 'state',
 
    -- Fields
    title = 'title',
    above = 'above',
    below = 'below',
    limage = 'left_image',
    rimage = 'right_image',
 
    -- Sections
    header_n = 'header_#',
    layout_n = 'layout_#',
    state_n = 'state_#',
    header_state = 'header_state',
 
    -- Table layout
    limage_n = 'left_image_#',
    rimage_n = 'right_image_#',
 
    -- Horizontal layout
    perrow_n = 'per_row_#',
    span_n = 'span_#',
 
    -- Groups
    group_n = 'group_#',
    group_n_m = 'group_#_#',
    list_n = 'list_#',
    list_n_m = 'list_#_#',
 
    -- CSS
    navbox_class = 'navbox_class',
    navbox_style = 'navbox_style',
    title_class = 'title_class',
    title_style = 'title_style',
    base_class = 'base_class',
    base_style = 'base_style',
    above_class = 'above_class',
    above_style = 'above_style',
    below_class = 'below_class',
    below_style = 'below_style',
    image_class = 'image_class',
    image_style = 'image_style',
    limage_class = 'left_image_class',
    limage_style = 'left_image_style',
    rimage_class = 'right_image_class',
    rimage_style = 'right_image_style',
    header_class = 'header_class',
    header_style = 'header_style',
    header_n_class = 'header_#_class',
    header_n_style = 'header_#_style',
    limage_n_class = 'left_image_#_class',
    limage_n_style = 'left_image_#_style',
    rimage_n_class = 'right_image_#_class',
    rimage_n_style = 'right_image_#_style',
    group_class = 'group_class',
    group_style = 'group_style',
    subgroup_class = 'subgroup_class',
    subgroup_style = 'subgroup_style',
    group_n_class = 'group_#_class',
    group_n_style = 'group_#_style',
    group_n_m_class = 'group_#_#_class',
    group_n_m_style = 'group_#_#_style',
    list_class = 'list_class',
    list_style = 'list_style',
    list_n_class = 'list_#_class',
    list_n_style = 'list_#_style',
    list_n_m_class = 'list_#_#_class',
    list_n_m_style = 'list_#_#_style',
 
    -- Values
    value_expanded = 'expanded',
    value_collapsed = 'collapsed',
    value_table_layout = 'table',
    value_horizontal_layout = 'horizontal',
}