ArgTitle – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix missing 6th level) |
Lou Montana (talk | contribs) (Add right argument and default values) |
||
Line 1: | Line 1: | ||
<includeonly><div><div style="float: left; margin-right: 0.5em;">{{{ | <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= = |2= == |3= === |4= ==== |5= ===== |6= ======}} {{{1}}} {{#switch: {{{2}}} |1= = |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>< | </div>}}</includeonly><noinclude>__NOTOC__ | ||
Defines a wiki title (e.g <tt>=== Title ===</tt>) | |||
== Usage == | == Usage == | ||
<code><nowiki>{{ArgTitle|title|titleLevel|leftArgument}}</nowiki></code> | <code><nowiki>{{ArgTitle|title|titleLevel|leftArgument}}</nowiki></code> | ||
* <tt>title</tt>: title text | * <tt>title</tt>: title text | ||
* <tt>titleLevel</tt>: 1..6 number (number of "=" in wiki code for title, e.g {{Inline code|<nowiki>== title H2 ==</nowiki>}}) | * <tt>titleLevel</tt>: (Optional, default 2) 1..6 number (number of "=" in wiki code for title, e.g {{Inline code|<nowiki>== title H2 ==</nowiki>}}) | ||
* <tt>leftArgument</tt>: any text that should be on the left of the title text (usually [[:Template:GVI|GVI]] or [[:Template:EffArg|EffArg]]) | * <tt>leftArgument</tt>: (Optional, default empty) any text that should be on the left of the title text (usually [[:Template:GVI|GVI]] or [[:Template:EffArg|EffArg]]) | ||
* <tt>rightArgument</tt>: (Optional, default empty) any text that should be on the right of the title text (usually [[:Template:GVI|GVI]] or [[:Template:EffArg|EffArg]]) | |||
< | |||
{| class="wikitable" | |||
|+ Examples | |||
! Code | |||
! style="min-width: 15em" | Result | |||
|- | |||
| <nowiki>{{ArgTitle}}</nowiki> | |||
| {{ArgTitle}} | |||
|- | |||
| <nowiki>{{ArgTitle|My Title}}</nowiki> | |||
| | |||
{{ArgTitle|My Title}} | |||
|- | |||
| <nowiki>{{ArgTitle|My Title|4}}</nowiki> | |||
| | |||
{{ArgTitle|My Title|4}} | |||
|- | |||
| <nowiki>{{ArgTitle|My Title|4|Left}}</nowiki> | |||
| | |||
{{ArgTitle|My Title|4|Left}} | |||
|- | |||
| <nowiki>{{ArgTitle|My Title|4|Left|Right}}</nowiki> | |||
| | |||
{{ArgTitle|My Title|4|Left|Right}} | |||
|- | |||
| <nowiki>{{ArgTitle|My Title|4||Right}}</nowiki> | |||
| | |||
{{ArgTitle|My Title|4||Right}} | |||
|} | |||
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude> | [[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude> |
Revision as of 18:18, 17 May 2020
Defines a wiki title (e.g === Title ===)
Usage
{{ArgTitle|title|titleLevel|leftArgument}}
- title: title text
- titleLevel: (Optional, default 2) 1..6 number (number of "=" in wiki code for title, e.g
== title H2 ==
) - leftArgument: (Optional, default empty) any text that should be on the left of the title text (usually GVI or EffArg)
- rightArgument: (Optional, default empty) any text that should be on the right of the title text (usually GVI or EffArg)
Code | Result |
---|---|
{{ArgTitle}} | |
{{ArgTitle|My Title}} |
My Title |
{{ArgTitle|My Title|4}} |
My Title |
{{ArgTitle|My Title|4|Left}} |
Left
My Title |
{{ArgTitle|My Title|4|Left|Right}} |
Left Right
My Title |
{{ArgTitle|My Title|4||Right}} |
Right
My Title |