ArgTitle – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Remove soon-to-be non-existent template link) |
Lou Montana (talk | contribs) m (Add Template:Doc/Template usage) |
||
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:{{{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>}} | ||
{{#switch: {{{2}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}} {{{1}}} {{#switch: {{{2}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}} | {{#switch: {{{2}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}} {{{1}}} {{#switch: {{{2}}} |1= = |#default|2= == |3= === |4= ==== |5= ===== |6= ======}} | ||
</div>}}</includeonly><noinclude>__NOTOC__ | </div>|-no title defined!-}}</includeonly><noinclude>__NOTOC__{{Doc/Template | ||
Defines a wiki title (e.g <tt>=== Title ===</tt>) | |descr= Defines a wiki title (e.g <tt>=== Title ===</tt>) | ||
|param1= title | |||
|descr1= title text | |||
|param2= level | |||
|descr2= (Optional, default 2) 1..6 number (number of "{{=}}" in wiki wode for title, e.g {{Inline code|<nowiki>== title H2 ==</nowiki>}}) | |||
|param3= left | |||
|descr3= (Optional, default empty) any text that should be on the left of the title text (usually {{Template|GVI}} or {{Template|Icon}}) | |||
|param4= right | |||
|descr4= (Optional, default empty) any text that should be on the right of the title text (usually {{Template|GVI}} or {{Template|Icon}}) | |||
|example1= style="min-width: 15em" {{!}} <nowiki>{{ArgTitle}}</nowiki> | |||
|result1= style="min-width: 15em" {{!}} {{ArgTitle}} | |||
|example2= <nowiki>{{ArgTitle|My Title}}</nowiki> | |||
|result2= {{ArgTitle|My Title}} | |||
|example3= <nowiki>{{ArgTitle|My Title|4}}</nowiki> | |||
|result3= {{ArgTitle|My Title|4}} | |||
| {{ArgTitle}} | |example4= <nowiki>{{ArgTitle|My Title|4|Left}}</nowiki> | ||
| | |result4= {{ArgTitle|My Title|4|Left}} | ||
|example5= <nowiki>{{ArgTitle|My Title|4||Right}}</nowiki> | |||
| | |result5= {{ArgTitle|My Title|4||Right}} | ||
{{ArgTitle|My Title}} | |example6= <nowiki>{{ArgTitle|My Title|4|Left|Right}}</nowiki> | ||
| | |result6= {{ArgTitle|My Title|4|Left|Right}} | ||
}}</noinclude> | |||
| | |||
{{ArgTitle|My Title|4}} | |||
| | |||
| | |||
{{ArgTitle|My Title|4|Left}} | |||
| | |||
| | |||
{{ArgTitle|My Title|4| | |||
| | |||
| | |||
{{ArgTitle|My Title|4||Right}} | |||
Revision as of 22:41, 7 February 2021
Defines a wiki title (e.g === Title ===)
This template is used on these pages.
Usage
{{ArgTitle|title|level|left|right}}
- title: title text
- level: (Optional, default 2) 1..6 number (number of "=" in wiki wode for title, e.g
== title H2 ==
) - 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|My Title}} | My Title |
{{ArgTitle|My Title|4}} | My Title |
{{ArgTitle|My Title|4|Left}} | Left
My Title |
{{ArgTitle|My Title|4||Right}} | Right
My Title |
{{ArgTitle|My Title|4|Left|Right}} | Left Right
My Title |