Module:ConceptNavbox/doc

From No Subject
Jump to navigation Jump to search

This is the documentation page for Module:ConceptNavbox


Module:ConceptNavbox

This module renders the psychoanalytic concept navigation box used on concept articles. It is the Lua renderer behind {{ConceptNavbox}}, converting structured data from Module:ConceptNavbox/data into a standard {{Navbox}}.

What it does

  • Reads parameters passed from {{ConceptNavbox}} (or direct #invoke calls).
  • Loads group/link data from Module:ConceptNavbox/data using mw.loadData.
  • Populates group1/list1, group2/list2, etc.
  • Renders output by calling {{Navbox}}.

Dependencies

This module assumes these pages exist:

Interface

Main entry point:

Most editors should use:

Parameters

state

Controls whether the navbox is expanded or collapsed by default.

  • collapsed (default)
  • expanded
title

Overrides the navbox title text. Default: Psychoanalytic concepts

Usage

On articles (recommended)

Place near the end of a concept page, before category tags:

{{ConceptNavbox}}

Direct invocation (testing / advanced)

{{#invoke:ConceptNavbox|main}}
{{#invoke:ConceptNavbox|main|state=expanded}}
{{#invoke:ConceptNavbox|main|title=Core concepts}}

Editing the concept lists

Do not edit this module to add/remove links. Edit:

Common errors

  • Navbox missing: Ensure Template:Navbox exists and is named exactly Navbox.
  • Data missing: Ensure Module:ConceptNavbox/data exists and returns a table with rows.
  • Blank output: Check that rows is a numerically indexed array and each row has group and list fields.

See also