Munurin millum rættingarnar hjá "Module:See also/doc"

108 bytes løgd afturat ,  7 mánaðir síðan
s
Bot: Erstatt forældet <source> -tag og parameteren "enclose" [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html]
(avritað frá ensku Wikipediu)
 
s (Bot: Erstatt forældet <source> -tag og parameteren "enclose" [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html])
 
Load the module:
 
<sourcesyntaxhighlight lang="lua">
local mSeealso = require('Module:See also')
</syntaxhighlight>
</source>
 
You can then use the _seealso function like this:
 
<sourcesyntaxhighlight lang="lua">
mSeealso._seealso(options, ...)
</syntaxhighlight>
</source>
 
The parameters following <var>options</var> are a list of link/display tables, used to generate the see also links. The first value in each table is the link, and is required. The link can be just a page name, or can include a section link if desired. Links specifying a section are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
 
; Example 1
<sourcesyntaxhighlight lang="lua">
mSeealso._seealso(nil, {'A'})
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote boilerplate seealso">See also: [[A]]</div></nowiki></code>
 
; Example 2
<sourcesyntaxhighlight lang="lua">
mSeealso._seealso(nil, {'A'}, {'B'}, {'C'})
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote boilerplate seealso">See also: [[A]], [[B]] and [[C]]</div></nowiki></code>
 
; Example 3
<sourcesyntaxhighlight lang="lua">
mSeealso._seealso(nil, {'A', 'the letter "A"'}, {'B', 'the letter "B"'}, {'C', 'the letter "C"'})
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote boilerplate seealso">See also: [[A|the letter "A"]], [[B|the letter "B"]] and [[C|the letter "C"]]</div></nowiki></code>
 
; Example 4
<sourcesyntaxhighlight lang="lua">
mSeealso._seealso({altphrase = 'Another page to see', selfref = true}, {'A#B'})
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote boilerplate seealso selfref">Another page to see: [[A#B|A § B]]</div></nowiki></code>
14.816

rættingar