Wikipedia:Lua/Modul/TemplateData/Values

Wikipedia:Lua Modul TemplateData Values

Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English

Modul: Dokumentation

Testfall für {{TemplateData}}.

Während das MediaWiki-Format von März 2021 nur Zeichenketten als Elemente des Arrays in suggestedvalues zulässt, akzeptiert die Erweiterung auch Objekte wie folgt:

suggestedvalues = Array aus:

  • Zeichenkette (string)
  • Objekt (object)
    code
    Pflichtkomponente, Zeichenkette (string)
    Wert, wie im Basisformat
    label
    Multilinguale Zeichenkette
    Kurze Erläuterung; der Code könnte unverständlich sein
    support
    wiki-page-name als Multilinguale Zeichenkette
    Seitenname, mit dem der Wert verlinkt werden soll (Wikilink)
    icon
    wiki-file-name
    Dateibezeichner einer Miniaturgrafik, die an den Anfang der Erläuterung gestellt werden soll
    class
    string oder Array
    Klassenbezeichner, um den gesamten Menüpunkt zu dekorieren
    style
    string oder object
    CSS-inline-Definitionen, um den gesamten Menüpunkt zu dekorieren
    less
    boolean
    true – Darstellung des Wertes selbst unterdrücken, etwa bei Dateinamen

While the official MediaWiki code is limited to an Array of strings as suggestedvalues, this extension does permit more exhaustive objects as Array elements:

suggestedvalues = Array of:

  • string
  • object
    code
    Mandatory string
    Value, as in basic format
    label
    multilingual string
    Brief explanation; the code might be less comprehensive
    support
    wiki-page-name as multilingual string
    Page name to assign an internal link to the value
    icon
    wiki-file-name
    Media identifier of a small image to precede the explanation
    class
    string or Array
    class names to be applied to the entire element
    style
    string or object
    CSS inline definition to be applied to the entire element
    less
    boolean
    true – suppress presentation of the value itself, e.g. on file names

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.