Module:Section link/doc: Difference between revisions

Content deleted Content added
No edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1:
{{used in system|in [[MediaWiki:Abusefilter-warning-notwallofshame]]}}
{{Module rating|protected}}
This module creates links to sections, nicely formatted with the "§" symbol instead of the default "#".
 
== Usage ==
 
Line 12:
First, load the module:
 
<sourcesyntaxhighlight lang="lua">
local mSectionLink = require('Module:Section link')
</syntaxhighlight>
</source>
 
You can then make section links via the _main function.
 
<sourcesyntaxhighlight lang="lua">
mSectionLink._main(page, sections, options, title)
</syntaxhighlight>
</source>
 
Parameters:
Line 37:
! Wikitext code
! Result
|-
| {{code|mSectionLink('Paris')|lua}}
| <code><nowiki>{{section link|Paris}}</nowiki></code>
| {{section link|Paris}}
|-
| {{code|mSectionLink('Paris', 'Architecture')|lua}}
Line 54 ⟶ 58:
| {{section link|Paris|Architecture|Culture|Sport|nopage=yes}}
|}
== See also ==
*The character used is {{unichar|00A7|name=|html=|nlink=Section sign}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandboxSandbox other| |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Link modules]]
 
}}</includeonly>