ArgTitle – Template
Lou Montana (talk | contribs) (Fix flexbox) |
Lou Montana (talk | contribs) (Added old retrocompatibility (that was {{ArgTitle|title|level}} instead of {{ArgTitle|level|title}} like now)) |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{2|}}}|<div style="display: flex; align-items: baseline">{{#if:{{{3|}}}|<div style="margin-right: 0.5em">{{{3}}}</div>}}<div style="flex-grow: 1"> | <includeonly>{{#switch: {{{2}}} | ||
{{#switch: {{{ | |1 | ||
|2 | |||
|3 | |||
|4 | |||
|5 | |||
|6= {{#if:{{{2|}}}|<div style="display: flex; align-items: baseline">{{#if:{{{3|}}}|<div style="margin-right: 0.5em">{{{3}}}</div>}}<div style="flex-grow: 1"> | |||
{{#switch: {{{2}}} | |||
|1= = | |||
|2= == | |||
|3= === | |||
|4= ==== | |||
|5= ===== | |||
|6= ======}} {{{1}}} {{#switch: {{{2}}} | |||
|1= = | |||
|2= == | |||
|3= === | |||
|4= ==== | |||
|5= ===== | |||
|6= ======}} | |||
</div>{{#if:{{{4|}}}|<div style="margin-left: 0.5em">{{{4}}}</div>}} | </div>{{#if:{{{4|}}}|<div style="margin-left: 0.5em">{{{4}}}</div>}} | ||
</div>|-no title defined!-{{TemplateCase||[[Category:ArgTitle template usage error]]}}}}</includeonly><noinclude>__NOTOC__{{Doc/Template | </div>|-no title defined!-{{TemplateCase||[[Category:ArgTitle template usage error]]}}}} | ||
|#default= {{#if:{{{2|}}}|<div style="display: flex; align-items: baseline">{{#if:{{{3|}}}|<div style="margin-right: 0.5em">{{{3}}}</div>}}<div style="flex-grow: 1"> | |||
{{#switch: {{{1}}} | |||
|1= = | |||
|#default | |||
|2= == | |||
|3= === | |||
|4= ==== | |||
|5= ===== | |||
|6= ======}} {{{2}}} {{#switch: {{{1}}} | |||
|1= = | |||
|#default | |||
|2= == | |||
|3= === | |||
|4= ==== | |||
|5= ===== | |||
|6= ======}} | |||
</div>{{#if:{{{4|}}}|<div style="margin-left: 0.5em">{{{4}}}</div>}} | |||
</div>|-no title defined!-{{TemplateCase||[[Category:ArgTitle template usage error]]}}}} | |||
}}</includeonly><noinclude>__NOTOC__{{Doc/Template | |||
|descr= Defines a wiki title (e.g {{hl|c= === Title ===}}) | |descr= Defines a wiki title (e.g {{hl|c= === Title ===}}) | ||
|param1= level | |param1= level | ||
| Line 24: | Line 63: | ||
|example6= <nowiki>{{ArgTitle|4|My Title|Left|Right}}</nowiki> | |example6= <nowiki>{{ArgTitle|4|My Title|Left|Right}}</nowiki> | ||
|result6= {{ArgTitle|4|My Title|Left|Right}} | |result6= {{ArgTitle|4|My Title|Left|Right}} | ||
|example7= <nowiki>{{ArgTitle|4|Test|{{GVI|ofp|1.00}}|{{ | |example7= <nowiki>{{ArgTitle|4|Test|{{GVI|ofp|1.00}}|{{Icon|serverExec|32}}}}</nowiki> | ||
|result7= <br><br>{{ArgTitle|4|Test|{{GVI|ofp|1.00}}|{{GVI| | |result7= <br><br>{{ArgTitle|4|Test|{{GVI|ofp|1.00}}|{{Icon|serverExec|32}}}}<br><br> | ||
|example8= <nowiki>{{ArgTitle|My Title|4}}</nowiki><br> | |||
<nowiki>{{ArgTitle|My Title|4|{{GVI|ofp|1.00}}}}</nowiki> | |||
|result8= {{ArgTitle|My Title|4}}<br>{{ArgTitle|My Title|4|{{GVI|ofp|1.00}}}} | |||
}}</noinclude> | }}</noinclude> | ||
Latest revision as of 15:32, 14 January 2026
Defines a wiki title (e.g === Title ===)
This template is used on these pages.
Usage
{{ArgTitle|level|title|left|right}}
- level: (Optional, default 2) 1..6 number (number of "=" in wiki wode for title, e.g
== title H2 ==) - title: title text
- left: (Optional, default empty) any text that should be on the left of the title text (usually {{GVI}} or {{Icon}})
- right: (Optional, default empty) any text that should be on the right of the title text (usually {{GVI}} or {{Icon}})
| Code | Result |
|---|---|
| {{ArgTitle}} | -no title defined!- |
| {{ArgTitle|4}} | -no title defined!- |
| {{ArgTitle|4|My Title}} | My Title |
| {{ArgTitle|4|My Title|Left}} | Left My Title |
| {{ArgTitle|4|My Title||Right}} | My TitleRight
|
| {{ArgTitle|4|My Title|Left|Right}} | Left My TitleRight
|
| {{ArgTitle|4|Test|{{GVI|ofp|1.00}}|{{Icon|serverExec|32}}}} | |
| {{ArgTitle|My Title|4}} {{ArgTitle|My Title|4|{{GVI|ofp|1.00}}}} |
My TitleMy Title |