imported>Oetterer |
|||
Zeile 12: | Zeile 12: | ||
Load the module: | Load the module: | ||
− | < | + | <syntaxhighlight lang="lua"> |
local mFurther = require('Module:Further') | local mFurther = require('Module:Further') | ||
− | </ | + | </syntaxhighlight> |
You can then use the _further function like this: | You can then use the _further function like this: | ||
− | < | + | <syntaxhighlight lang="lua"> |
mDetails._further(options, ...) | mDetails._further(options, ...) | ||
− | </ | + | </syntaxhighlight> |
The parameters following <var>options</var> are the page names that appear after the "Further information:" text. Page names can include a section link if desired. Pages with section links are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. | The parameters following <var>options</var> are the page names that appear after the "Further information:" text. Page names can include a section link if desired. Pages with section links are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. | ||
Zeile 27: | Zeile 27: | ||
; Example 1 | ; Example 1 | ||
− | < | + | <syntaxhighlight lang="lua"> |
mFurther._further(nil, 'A') | mFurther._further(nil, 'A') | ||
− | </ | + | </syntaxhighlight> |
Produces: | Produces: | ||
:<code><nowiki><div class="hatnote">Further information: [[A]]</div></nowiki></code> | :<code><nowiki><div class="hatnote">Further information: [[A]]</div></nowiki></code> | ||
Zeile 36: | Zeile 36: | ||
; Example 2 | ; Example 2 | ||
− | < | + | <syntaxhighlight lang="lua"> |
mFurther._further(nil, 'A', 'B', 'C') | mFurther._further(nil, 'A', 'B', 'C') | ||
− | </ | + | </syntaxhighlight> |
Produces: | Produces: | ||
:<code><nowiki><div class="hatnote">Further information: [[A]], [[B]] and [[C]]</div></nowiki></code> | :<code><nowiki><div class="hatnote">Further information: [[A]], [[B]] and [[C]]</div></nowiki></code> | ||
Zeile 45: | Zeile 45: | ||
; Example 3 | ; Example 3 | ||
− | < | + | <syntaxhighlight lang="lua"> |
mFurther._further({selfref = true}, 'A#D', 'B#D', 'C#D') | mFurther._further({selfref = true}, 'A#D', 'B#D', 'C#D') | ||
− | </ | + | </syntaxhighlight> |
Produces: | Produces: | ||
:<code><nowiki><div class="hatnote selfref">Further information: [[A#D|A § D]], [[B#D|B § D]] and [[B#D|C § D]]</div></nowiki></code> | :<code><nowiki><div class="hatnote selfref">Further information: [[A#D|A § D]], [[B#D|B § D]] and [[B#D|C § D]]</div></nowiki></code> | ||
Zeile 60: | Zeile 60: | ||
<!-- Categories go here and interwikis go in Wikidata. --> | <!-- Categories go here and interwikis go in Wikidata. --> | ||
− | }}</includeonly> | + | }}</includeonly><!-- null edit comment; remove --> |
Aktuelle Version vom 5. Oktober 2022, 15:03 Uhr
This is a documentation subpage for Modul:Further. It contains usage information, categories and other content that is not part of the original modul page. |
This module is rated as ready for general use. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
This module produces a "Further information: a, b and c" link. It implements the {{further}} template.
Usage from wikitext[Quelltext bearbeiten]
This module cannot be used directly from #invoke. Instead, it can only be used through the {{further}} template. Please see the template page for documentation.
Usage from other Lua modules[Quelltext bearbeiten]
Load the module:
local mFurther = require('Module:Further')
You can then use the _further function like this:
mDetails._further(options, ...)
The parameters following options are the page names that appear after the "Further information:" text. Page names can include a section link if desired. Pages with section links are automatically formatted as page § section, rather than the MediaWiki default of page#section.
The options variable is an optional configuration table. At current, the only option available is "selfref", which is used when the output is a self-reference to Wikipedia. to set this option, use lua
. (See the {{selfref}} template for more details on self-references.)
- Example 1
mFurther._further(nil, 'A')
Produces:
<div class="hatnote">Further information: [[A]]</div>
Displays as:
- Example 2
mFurther._further(nil, 'A', 'B', 'C')
Produces:
<div class="hatnote">Further information: [[A]], [[B]] and [[C]]</div>
Displays as:
- Example 3
mFurther._further({selfref = true}, 'A#D', 'B#D', 'C#D')
Produces:
<div class="hatnote selfref">Further information: [[A#D|A § D]], [[B#D|B § D]] and [[B#D|C § D]]</div>
Displays as:
Technical details[Quelltext bearbeiten]
This module uses Module:Hatnote to format the hatnote text, Module:TableTools to process the list of links, and Module:Arguments to fetch the arguments from wikitext.