Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch English

Modul: Dokumentation

Shortcuts – Module to manage abbreviated links to frequently accessed pages.

Functions for templates

Bearbeiten
template
Support for {{Shortcut}} – Display hint on target page
Parameters of template transclusion:
  • 1
    List of shortcuts for this page, separated by commas
    HTML-Tags like <s> are possible and will be ignored.
    Optional – Default: retrieve from central registry; that precedes template parameter
  • light
    Suppress hint styling
    Optional – Default: place hint at certain position: style
Checks:
  • Is every shortcut in list a redirect?
  • Does this redirect page points in effect on target page?
  • Is redirect page categorized appropriately?
  • (future) If a talk page exists, {{Shortcut}} should have been used.
total
Table body of all shortcuts, initially sorted by abbreviation title
Parameters of #invoke:
  • nsn
    number of a namespace
    Optional – Default: all
Is to be completed by two column table head: shortcut / target page.
trows
Support for {{Shortcuts}} – generate table row (two columns) within survey
Parameters of template transclusion:
  • 1
    Canonical name of registered target page (spaced format)
    Mandatory
  • 2 3 4 5 6 7 8 9
    More target page names (any number)
    Optional
  • space
    Canonical name of namespace which precedes all registered target pages; then only page titles may be provided.
    Optional
  • story
    Wikitext with amendment to name of target page
    Optional
  • suffix
    Wikitext with amendment to list of shortcuts
    Optional
twoletters
Matrix with all two letter abbreviations in namespace and highlighting of registered shortcuts.
Not yet implemented.
Parameters of #invoke:
  • nsn
    number of a namespace
    Mandatory

Configuration

Bearbeiten

The settings in effect for the current project are described by /config.

Functions for Lua modules

Bearbeiten

There is one particular function for testing:

p.test(args)
args are the parameters, which would have been used on template transclusion or on #invoke call. Additionally can be provided or may be required:
  • args.suite – path to module; here: Module:Shortcuts
  • args.service – kind of action; name of function
  • args.shortcuts – liste
  • args.self – use as current page name

Unique for the entire Wiki project.

Dependencies

Bearbeiten