hl – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
(Add slash and antislash <wbr> word-breaking tag for mobiles and small monitors + examples)
Line 1: Line 1:
<includeonly><var>{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}</var></includeonly><noinclude>{{Doc/Template
<includeonly><var>{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|\|<wbr>\}}|/|<wbr>/}}</var></includeonly><noinclude>{{Doc/Template
|descr= This template displays '''h'''igh'''l'''ighted content - its purpose is to replace {{hl|&lt;tt&gt;}} usage across the wiki. It also adds the page to the [[:Category:hl template usage error|hl template usage error]] category on usage error.
|descr= This template displays '''h'''igh'''l'''ighted content - its purpose is to replace {{hl|&lt;tt&gt;}} usage across the wiki. It also adds the page to the [[:Category:hl template usage error|hl template usage error]] category on usage error.
|param1= c
|param1= c
Line 6: Line 6:
** use {{hl|c= c=}}
** use {{hl|c= c=}}
** use the MediaWiki trick {{hl|c= 1=}}
** use the MediaWiki trick {{hl|c= 1=}}
|example1= <nowiki>{{hl}}</nowiki>
|example1= <nowiki>{{hl}}</nowiki>
|result1= {{hl}}
|result1= {{hl}}
|example2= <nowiki>{{hl|"AWARE"}}</nowiki>
|example2= <nowiki>{{hl|"AWARE"}}</nowiki>
|result2= {{hl|"AWARE"}}
|result2= {{hl|"AWARE"}}
|example3= <nowiki>{{hl|</nowiki>oneLongFilePath<wbr>/ThatCannotLineBreak<wbr>/OnMobileOrOtherNonWideScreen<wbr>/BecauseThereAreNoSpaces<wbr>/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour<wbr>/LetsCoverAllTheCases}<nowiki/>}
|result3= {{hl|oneLongFilePath/ThatCannotLineBreak/OnMobileOrOtherNonWideScreen/BecauseThereAreNoSpaces/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour/LetsCoverAllTheCases}}
|example4= <nowiki>{{hl|</nowiki>oneLongFilePath<wbr>\ThatCannotLineBreak<wbr>\OnMobileOrOtherNonWideScreen<wbr>\BecauseThereAreNoSpaces<wbr>\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour<wbr>\LetsCoverAllTheCases}<nowiki/>}
|result4= {{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}}
}}</noinclude>
}}</noinclude>

Revision as of 11:59, 9 October 2024

This template displays highlighted content - its purpose is to replace <tt> usage across the wiki. It also adds the page to the hl template usage error category on usage error.

This template is used on these pages.

Usage

{{hl|c}}

  • c: the content to display.
    If it contains an equal sign =, which it should not (for inline code, / should be used instead):
    • replace it with
    • use c=
    • use the MediaWiki trick 1=
Examples
Code Result
{{hl}} -No content provided-
{{hl|"AWARE"}} "AWARE"
{{hl|oneLongFilePath/ThatCannotLineBreak/OnMobileOrOtherNonWideScreen/BecauseThereAreNoSpaces/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour/LetsCoverAllTheCases}} oneLongFilePath/ThatCannotLineBreak/OnMobileOrOtherNonWideScreen/BecauseThereAreNoSpaces/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour/LetsCoverAllTheCases
{{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}} oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases