Modul:Further/dok

Fra Wikipedia, den frie encyklopædi

This module produces a "Further information: a, b and c" link. It implements the {{further}} template.

Usage from wikitext[rediger kildetekst]

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[rediger kildetekst]

Load the module:

local mFurther = require('Module:Further')

You can then use the _further function like this:

mDetails._further(pages, options)

The pages argument should be a table of page link strings; if they use custom display values, each string should be preprocessed into a single piped string (e.g. page|display value). Links specifying a section are automatically formatted as page § section, rather than the MediaWiki default of page#section, if no custom display value is set.

The options argument 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 {selfref = true}. (See the {{selfref}} template for more details on self-references.)

Example 1[rediger kildetekst]

mFurther._further({'A'})

Produces:

<div role="note" class="hatnote">Further information: [[A]]</div>

Displays as:

Yderligere information: A

Example 2[rediger kildetekst]

mFurther._further({'A', 'B', 'C'})

Produces:

<div role="note" class="hatnote">Further information: [[A]], [[B]] and [[C]]</div>

Displays as:

Yderligere information: A, B, og C

Example 3[rediger kildetekst]

mFurther._further({'A#D', 'B#D', 'C#D'}, {selfref = true})

Produces:

<div role="note" class="hatnote selfref">Further information: [[A#D|A § D]], [[B#D|B § D]] and [[B#D|C § D]]</div>

Displays as:

Yderligere information: A § D, B § D, og C § D

Technical details[rediger kildetekst]

This module uses Modul:Hatnote to format the hatnote text, Modul:Hatnote list to process the list of links, and Modul:Arguments to fetch the arguments from wikitext.