Modul:Details
This module produces a "for more details on this topic" link. It implements the {{detaljer}} template.
Use from wikitext
This module cannot be used directly from #invoke. Instead, it can only be used through the {{detaljer}} template. Please see the template page for documentation.
Use from other Lua modules
Load the module:
local mDetails = require('Module:Details')
You can then use the _details function like this:
mDetails._details(page, topic, options)
The page 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.
The topic variable is a description of the topic, and is optional. The default topic value is "this topic".
The options table can be used to configure the function's output. 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
mDetails._details('Carbon dioxide data')
Produces:
<div class="hatnote boilerplate seealso">For more details on this topic, see [[Carbon dioxide data]].</div>
Displays as:
- Example 2
mDetails._details('Carbon dioxide data', 'the physical properties of carbon dioxide')
Produces:
<div class="hatnote boilerplate seealso">For more details on the physical properties of carbon dioxide, see [[Carbon dioxide data]].</div>
Displays as:
- Example 3
mDetails._details('Lua programming on Wikipedia', 'Wikipedia:Lua', {selfref = true})
Produces:
<div class="hatnote selfref">For more details on Lua programming on Wikipedia, see [[Wikipedia:Lua]].</div>
Displays as:
Tekniske detaljer
This module uses Modul:Hatnote to format the hatnote text and Modul:Arguments to fetch the arguments from wikitext.
--[[
-- This module produces a "For more details on this topic" link. It implements
-- the {{details}} template.
--]]
local mHatnote = require('Module:Hatnote')
local mArguments -- lazily initialise
local p = {}
function p.details(frame)
mArguments = require('Module:Arguments')
local args = mArguments.getArgs(frame, {parentOnly = true})
local page = args[1]
local topic = args[2]
if not page then
return mHatnote.makeWikitextError(
'no page name specified',
'Template:Details#Errors',
args.category
)
end
local options = {
selfref = args.selfref,
}
return p._details(page, topic, options)
end
function p._details(page, topic, options)
page = mHatnote._formatLink(page)
topic = topic or 'dette emne'
local text = string.format('For flere detaljer om %s, se %s.', topic, page)
options = options or {}
return mHatnote._hatnote(text, options)
end
return p
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.
- 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:
- 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.
- 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.
- 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.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.









