Content deleted Content added
→Examples: Rm deleted |
→Format link: document the new _formatLink parameters |
||
Line 57:
<source lang="lua">
mHatnote._formatLink
</source>
Formats <var>link</var> as a wikilink for display in hatnote templates, with optional display value <var>display</var>. Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
If <var>italicizePage</var> is true then the page portion of the link is italicized, and if <var>italicizePage</var> is true then the section portion of the link is italicized.
;Examples:
:
:
:
:
: <source lang="lua" inline>mHatnote._formatLink{link = 'Quo warranto#Philippines', italicizePage = true}</source> → <nowiki>[[Quo warranto#Philippines|<i>Quo warranto</i> §&nbsp;Philippines]]</nowiki> → {{format hatnote link|Quo warranto#Philippines|italicizepage=true}}
: <source lang="lua" inline>mHatnote._formatLink{link = 'Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice', italicizeSection = true}</source> → <nowiki>[[Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|Cybercrime Prevention Act of 2012 §&nbsp;<i>Disini v. Secretary of Justice</i>]]</nowiki> → {{format hatnote link|Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|italicizesection=true}}
=== Format pages ===
|