Wikipedia:Lua/Modul/Vorlage:Auflistung/en

Aus Wikipedia
Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch English

Modul: Dokumentation
Weiterleitung der Diskussionsseite fehlt

Vorlage:Auflistung – Module to present horizontal lists with separators as continuous text. The list itself is a block element.

Functions for templates[Am Gwëntext werkeln]

f
Present a list.
1
List of items; each line starting with one of * or #
If there is one item only no additional decoration will be generated.
nowrap
1 – Every item kept on the same line
sep
Contents of a separating <span> between items
styles
Name of a TemplateStyles page
classesBlock
Class(es) for entire block element
classesSep
Class(es) for separating <span>
failsafe
Version management

Wikipedia:Lua/Modul-Failsafe/en

Accessibility[Am Gwëntext werkeln]

Elements can be distinguished and navigated by screenreaders.

Functions for Lua modules (API)[Am Gwëntext werkeln]

All functions described above can be used by other modules per require():

local lucky, HorizontalList = pcall( require, "Module:Vorlage:Auflistung" )
if type( HorizontalList ) == "table" then
 HorizontalList = HorizontalList.HorizontalList()
else
 -- error case; HorizontalList contains message
 return "<span class=\"error\">" .. HorizontalList .. "</span>"
end

Subsequently there are available:

HorizontalList.f( all, altogether, apart, frame )
Generate horizontal list from wikitext.
  • allstring, with wikitext; each line starting with one of * or #
  • altogetherboolean, if nowrap applied around each regular item
  • apartstring, for separating <span> between items, if desired
  • frame – object, if available
Returns: string
HorizontalList.fiat( all, advance, altogether, apart, frame )
Generate horizontal list from table.
  • alltable, with sequence of items.
    • Each item is a string or a mw.html object.
  • advanceboolean, if <ol> requested
  • altogetherboolean, if nowrap applied around each regular item
  • apartstring, for separating <span> between items, if desired
  • frame – object, if available
Returns: string
HorizontalList.first( arglist )
Configuration of CSS environment
  • arglisttable, with optional configuration assignments; components:
    styles
    TemplateStyles page
    • string, with page name
    • mw.title object.
    classesBlock
    class(es) for entire block element
    • string, with class(es)
    • table, with components as string
    classesSep
    class(es) for separating <span>
    • string, with class(es)
    • table, with components as string
HorizontalList.failsafe( atleast )
atleast
optional; see above
Returns: string or boolean

General library; no limitations.

Dependencies[Am Gwëntext werkeln]

None.