Wikipedia:Lua/Modul/Vorlage:Auflistung/en
Erscheinungsbild
< Wikipedia:Lua | Modul
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.
all
– string, with wikitext; each line starting with one of*
or#
altogether
– boolean, ifnowrap
applied around each regular itemapart
– string, for separating<span>
between items, if desiredframe
– object, if available
- Returns: string
- HorizontalList.fiat( all, advance, altogether, apart, frame )
- Generate horizontal list from table.
all
– table, with sequence of items.- Each item is a string or a
mw.html
object.
- Each item is a string or a
advance
– boolean, if<ol>
requestedaltogether
– boolean, ifnowrap
applied around each regular itemapart
– string, for separating<span>
between items, if desiredframe
– object, if available
- Returns: string
- HorizontalList.first( arglist )
- Configuration of CSS environment
arglist
– table, 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
Usage
[Am Gwëntext werkeln]General library; no limitations.
Dependencies
[Am Gwëntext werkeln]None.