Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Created page with "<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> This module produces a "For a more comprehensive list, see [...]" link. It implements the {{tl|main list}} template. == Use from wikitext == This module cannot be used directly from #invoke. Instead, it can only be used through the {{tl|main list}} template. Please see the template page for documentation. == Use from other Lua modules ==..."
 
No edit summary
Line 1: Line 1:
{{doc sub}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This module produces a "For a more comprehensive list, see [...]" link. It implements the {{tl|main list}} template.
This module produces a "For a more comprehensive list, see [...]" link. It implements the {{tl|main list}} template.
Line 48: Line 49:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
<!-- Categories go here and interwikis go in Wikidata. -->
[[Category:Modules]]
[[Category:Hatnote modules]]
[[Category:Hatnote modules]]
}}</includeonly>
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
</noinclude>

Revision as of 02:12, 2 March 2025

This module produces a "For a more comprehensive list, see [...]" link. It implements the {{main list}} template.

Use from wikitext

This module cannot be used directly from #invoke. Instead, it can only be used through the {{main list}} template. Please see the template page for documentation.

Use from other Lua modules

Load the module:

local mMainList = require('Module:Main list')

You can then use the _mainList function like this:

mMainList._mainList (page1, page2)

The page1 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 page2 variable is optional; it is a second page link.

Example 1

mMainList._mainList ('Wikipedia:Hatnote#Hatnote templates')

Produces:

<div class="hatnote">For a more comprehensive list, see [[Wikipedia:Hatnote#Hatnote templates|Wikipedia:Hatnote § Hatnote templates]].</div>

Displays as:

For a more comprehensive list, see Wikipedia:Hatnote § Hatnote templates.

Example 2

mMainList._mainList ('Wikipedia:Hatnote#Hatnote templates','Wikipedia:Template messages/Cleanup#Cleanup')

Produces:

<div class="hatnote">For a more comprehensive list, see [[Wikipedia:Hatnote#Hatnote templates|Wikipedia:Hatnote § Hatnote templates]] and [[Wikipedia:Template messages/Cleanup#Cleanup|Wikipedia:Template messages/Cleanup § Cleanup]].</div>

Displays as:

Technical details

This module uses Module:Hatnote to format the hatnote text and Module:Arguments to fetch the arguments from wikitext.