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

90 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]
(Stovnaði síðu við "This module produces a "for more details on this topic" link. It implements the {{tl|details}} template. == Use from wikitext == This module cannot be used directly from...")
 
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 mDetails = require('Module:Details')
</syntaxhighlight>
</source>
 
You can then use the _details function like this:
 
<sourcesyntaxhighlight lang="lua">
mDetails._details(page, topic, options)
</syntaxhighlight>
</source>
 
The <var>page</var> variable is the page to be linked to, and is required. The page name can include a section link if desired. If the page includes a section link, it is automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
 
; Example 1
<sourcesyntaxhighlight lang="lua">
mDetails._details('Carbon dioxide data')
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote boilerplate seealso">For more details on this topic, see [[Carbon dioxide data]].</div></nowiki></code>
 
; Example 2
<sourcesyntaxhighlight lang="lua">
mDetails._details('Carbon dioxide data', 'the physical properties of carbon dioxide')
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote boilerplate seealso">For more details on the physical properties of carbon dioxide, see [[Carbon dioxide data]].</div></nowiki></code>
 
; Example 3
<sourcesyntaxhighlight lang="lua">
mDetails._details('Lua programming on Wikipedia', 'Wikipedia:Lua', {selfref = true})
</syntaxhighlight>
</source>
Produces:
:<code><nowiki><div class="hatnote selfref">For more details on Lua programming on Wikipedia, see [[Wikipedia:Lua]].</div></nowiki></code>
14.816

rættingar