Difference between revisions of "Template:EnchTitle"
From DDO Compendium
MNDeveloper (talk | contribs) |
MNDeveloper (talk | contribs) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|description = This template is used to render the title of an item enchantment, and handle the different views. | |description = This template is used to render the title of an item enchantment, and handle the different views. | ||
|category=Shared Templates | |category=Shared Templates | ||
|example1 = <nowiki>{{ | |example1 = <nowiki>{{EnchTitle|Abilities#Constitution|Constitution +3|}}</nowiki> | ||
|example1output = {{ | |example1output = {{EnchTitle|Abilities#Constitution|Constitution +3}} | ||
|example2 = <nowiki>{{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness}}</nowiki> | |||
|example2output = {{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness}} | |||
|example3 = <nowiki>{{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness|True}}</nowiki> | |||
|example3output = {{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness|True}} | |||
|parameter1name = Page name | |parameter1name = Page name | ||
|parameter1description = The name of the page to link to | |parameter1description = The name of the page to link to | ||
|parameter2name = Title | |parameter2name = Title | ||
|parameter2description = The title to show to the viewer | |parameter2description = The generated title to show to the viewer | ||
|parameter3name = Title Override | |||
|parameter3description = The title override if sent in on main template | |||
|parameter4name = No Link | |||
|parameter4description = Specify value here if there is no link. | |||
|parameter5name = Show in title only mode | |||
|parameter5description = Specify a value here to show only in "titleonly" mode | |||
}} | }} | ||
</noinclude><onlyinclude>{{# | </noinclude><onlyinclude>{{#if: {{{4|}}}|{{#switch: {{lc:{{#dplvar:enhview}}}} | ||
|titleonly={{#if:{{{3|}}}|{{{3}}}|{{{2}}}}} | |||
|#default={{#if: {{{5|}}}||'''{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}:''' }}}}|{{#switch: {{lc:{{#dplvar:enhview}}}} | |||
|titleonly={{#if: {{{1|}}}|[[{{{1}}}|{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}]]|{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}}} | |||
|#default={{#if: {{{5|}}}||{{#if: {{{1|}}}|[[{{{1}}}|'''{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}:''']]|'''{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}:'''}} }} | |||
}}}}</onlyinclude> |
Latest revision as of 17:37, 11 November 2021
RenderEnchantmentTitle[edit]
This template is used to render the title of an item enchantment, and handle the different views.
Example Usage | |
{{EnchTitle|Abilities#Constitution|Constitution +3|}} | Constitution +3: |
{{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness}} | Curse of Clumsiness: |
{{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness|True}} | Curse of Clumsiness: |
Usage[edit]
{{RenderEnchantmentTitle|(Page name)|(Title)|(Title Override)|(No Link)|(Show in title only mode)}}
Parameter Documentation | |
Page name | The name of the page to link to |
Title | The generated title to show to the viewer |
Title Override | The title override if sent in on main template |
No Link | Specify value here if there is no link. |
Show in title only mode | Specify a value here to show only in "titleonly" mode |
Template
Ignore any errors below this line, The errors occur because there is no input into the template, in the template itself.
{{{2}}}: