<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://skandinavien-wiki.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2603%3A6011%3A9D3E%3A678D%3AF498%3A25C%3AFDB7%3AAC17</id>
	<title>skandinavien-wiki.net - Benutzerbeiträge [de]</title>
	<link rel="self" type="application/atom+xml" href="https://skandinavien-wiki.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2603%3A6011%3A9D3E%3A678D%3AF498%3A25C%3AFDB7%3AAC17"/>
	<link rel="alternate" type="text/html" href="https://skandinavien-wiki.net/wiki/Spezial:Beitr%C3%A4ge/2603:6011:9D3E:678D:F498:25C:FDB7:AC17"/>
	<updated>2026-05-10T06:21:17Z</updated>
	<subtitle>Benutzerbeiträge</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://skandinavien-wiki.net/w/index.php?title=Modul:Labelled_list_hatnote/doc&amp;diff=4566</id>
		<title>Modul:Labelled list hatnote/doc</title>
		<link rel="alternate" type="text/html" href="https://skandinavien-wiki.net/w/index.php?title=Modul:Labelled_list_hatnote/doc&amp;diff=4566"/>
		<updated>2022-10-10T05:07:16Z</updated>

		<summary type="html">&lt;p&gt;2603:6011:9D3E:678D:F498:25C:FDB7:AC17: https://en.wikipedia.org/w/index.php?title=Module:Labelled_list_hatnote/doc&amp;amp;action=edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://en.wikipedia.org/w/index.php?title=Module:Labelled_list_hatnote/doc&amp;amp;action=edit== Usage ==&lt;br /&gt;
&lt;br /&gt;
===labelledList===&lt;br /&gt;
Invoking the &amp;lt;code&amp;gt;labelledList()&amp;lt;/code&amp;gt; function is enough to implement most such templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Labelled list hatnote|labelledList|Universal label}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, providing &amp;quot;See also&amp;quot; instead of &amp;quot;Universal label&amp;quot; duplicates the functionality of {{tl|see also}}, while providing &amp;quot;Main article&amp;quot; and &amp;quot;Main articles&amp;quot; instead of &amp;quot;Singular label&amp;quot; and &amp;quot;Plural label&amp;quot; duplicates the (article namespace) functionality of {{tl|main}}.&lt;br /&gt;
&lt;br /&gt;
If third and fourth labels are provided, they&#039;ll be used in the case where any of the target pages are outside the article namespace, so e.g. {{tl|main}} can be implemented thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===preprocessDisplays===&lt;br /&gt;
The &amp;lt;code&amp;gt;preprocessDisplays()&amp;lt;/code&amp;gt; function takes a raw list of arguments and combines in any display arguments. For example, {{tlx|see also|1|&amp;lt;nowiki&amp;gt;l1=One&amp;lt;/nowiki&amp;gt;}} initially has the arguments table &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{&#039;1&#039;, [&#039;l1&#039;] = &#039;One&#039;}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;; this table would combine those into the table &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{&#039;1|One&#039;}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. It overrides manual piping (e.g. {{tlx|see also|&amp;lt;nowiki&amp;gt;1{{!}}2&amp;lt;/nowiki&amp;gt;|&amp;lt;nowiki&amp;gt;l1=One&amp;lt;/nowiki&amp;gt;}} → &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{&#039;1|One&#039;}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) and compresses sparse arrays if a parameter is skipped or left empty.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mLabelledList = require(&#039;Module:Labelled list hatnote&#039;)&lt;br /&gt;
local pages = mLabelledList.preprocessDisplays(args)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===_labelledList===&lt;br /&gt;
For modules that need to modify the functionality slightly while still using it, &amp;lt;code&amp;gt;_labelledList()&amp;lt;/code&amp;gt; provides some flexibility. It takes three parameters:&lt;br /&gt;
# A pages list, preferably preprocessed and compressed by &amp;lt;code&amp;gt;preprocessDisplays&amp;lt;/code&amp;gt;&lt;br /&gt;
# A labels table, where the first item is the singular or universal label, and the second either a plural label or a copy of the first.&lt;br /&gt;
# An options table, preferably containing:&lt;br /&gt;
#* a &amp;lt;code&amp;gt;template&amp;lt;/code&amp;gt; string with the full title of the template. Defaults to the title of this module.&lt;br /&gt;
#* a &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; string (or nil) as taken by &amp;lt;code&amp;gt;makeWikitextError&amp;lt;/code&amp;gt; from [[Module:Hatnote]], to optionally disable error categories&lt;br /&gt;
#* a &amp;lt;code&amp;gt;selfref&amp;lt;/code&amp;gt; string (or nil) as taken by &amp;lt;code&amp;gt;_hatnote&amp;lt;/code&amp;gt; to enable the selfref option&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mLabelledList = require(&#039;Module:Labelled list hatnote&#039;)&lt;br /&gt;
return mLabelledList._labelledList(pages, labels, options)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
This module causes templates based on it to produce an error message if no page names are provided as template parameters. Normally, these should lead back to &amp;quot;Errors&amp;quot; sections in the documentation of those templates. However, if those templates use a module with &amp;lt;code&amp;gt;_labelledList()&amp;lt;/code&amp;gt; and don&#039;t provide a &amp;lt;code&amp;gt;template&amp;lt;/code&amp;gt; item in their options table, that error defaults to leading back here. The error can be solved by providing at least one valid page-name parameter to the template in question; the problem in the template can be fixed by providing some value to the &amp;lt;code&amp;gt;template&amp;lt;/code&amp;gt; item of the &amp;lt;code&amp;gt;_labelledList()&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;options&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules| ]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>2603:6011:9D3E:678D:F498:25C:FDB7:AC17</name></author>
	</entry>
</feed>