ArgTitle – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{ArgTitle *\| *([^\|]+) *\| *([1-6]) *\|" to "{{ArgTitle|$2|$1|")
(Fix parameters order)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|<div>{{#if:{{{3|}}}|<div style="float: left; margin-right: 0.5em">{{{3}}}</div>}}{{#if:{{{4|}}}|<div style="float: right; margin-left: 0.5em">{{{4}}}</div>}}
<includeonly>{{#if:{{{2|}}}|<div>{{#if:{{{3|}}}|<div style="float: left; margin-right: 0.5em">{{{3}}}</div>}}{{#if:{{{4|}}}|<div style="float: right; margin-left: 0.5em">{{{4}}}</div>}}
{{#switch: {{{2}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}} {{{1}}} {{#switch: {{{2}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}}
{{#switch: {{{1}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}} {{{2}}} {{#switch: {{{1}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}}
</div>|-no title defined!-}}</includeonly><noinclude>__NOTOC__{{Doc/Template
</div>|-no title defined!-}}</includeonly><noinclude>__NOTOC__{{Doc/Template
|descr= Defines a wiki title (e.g <tt>=== Title ===</tt>)
|descr= Defines a wiki title (e.g <tt>=== Title ===</tt>)
|param1= title
|param1= level
|descr1= title text
|descr1= (Optional, default 2) 1..6 number (number of "{{=}}" in wiki wode for title, e.g {{ic|<nowiki>== title H2 ==</nowiki>}})
|param2= level
|param2= title
|descr2= (Optional, default 2) 1..6 number (number of "{{=}}" in wiki wode for title, e.g {{ic|<nowiki>== title H2 ==</nowiki>}})
|descr2= title text
|param3= left
|param3= left
|descr3= (Optional, default empty) any text that should be on the left of the title text (usually {{Template|GVI}} or {{Template|Icon}})
|descr3= (Optional, default empty) any text that should be on the left of the title text (usually {{Template|GVI}} or {{Template|Icon}})
Line 13: Line 13:
|example1= style="min-width: 15em" {{!}} <nowiki>{{ArgTitle}}</nowiki>
|example1= style="min-width: 15em" {{!}} <nowiki>{{ArgTitle}}</nowiki>
|result1= style="min-width: 15em" {{!}} {{ArgTitle}}
|result1= style="min-width: 15em" {{!}} {{ArgTitle}}
|example2= <nowiki>{{ArgTitle|My Title}}</nowiki>
|example2= <nowiki>{{ArgTitle|4}}</nowiki>
|result2= {{ArgTitle|My Title}}
|result2= {{ArgTitle|4}}
|example3= <nowiki>{{ArgTitle|My Title|4}}</nowiki>
|example3= <nowiki>{{ArgTitle|4|My Title}}</nowiki>
|result3= {{ArgTitle|My Title|4}}
|result3= {{ArgTitle|4|My Title}}
|example4= <nowiki>{{ArgTitle|4|My Title|Left}}</nowiki>
|example4= <nowiki>{{ArgTitle|4|My Title|Left}}</nowiki>
|result4= {{ArgTitle|4|My Title|Left}}
|result4= {{ArgTitle|4|My Title|Left}}

Revision as of 01:48, 9 August 2021

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}})
Examples
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}}
Right

My Title

{{ArgTitle|4|My Title|Left|Right}}
Left
Right

My Title