Fandom Developers Wiki

Section link is a global Lua module used for implementing the template {{section link}}. It is a copy of Wikipedia's section link module.

Installation[]

API[]

Package items[]

Section link._main(page, sections, options, title) (function)
Creates links to one or more page sections.
Parameters:
page The name of the page to link to. If this is nil or a blank string, _main will create a link to the current page. (string; optional)
sections A single section name or an array of section names. Defaults to 'Notes'. (string|table; optional)
options Options for modifying the generated links. (table; optional)
options.nopage If true, _main will not add the page name to the link text. (boolean; optional)
options.display If set, _main will replace the page name in the output with the value of display. (string; optional)
title A Scribunto title object. If title is set and page is not set (or blank), _main will add the title to the link text. (table; optional)
Returns: The wikitext output. (string)
Section link.main(frame) (function)
Creates links to one or more page sections. This is the entrypoint for Template:Section link.
Parameter: frame The Scribunto frame object. (Frame)
Returns: The wikitext output. (string)