Difference between revisions of "Template:EnchTitle"
MNDeveloper (talk | contribs) |
MNDeveloper (talk | contribs) |
||
Line 19: | Line 19: | ||
|parameter4description = Specify value here if there is no link. | |parameter4description = Specify value here if there is no link. | ||
}} | }} | ||
</noinclude><onlyinclude>{{#if: {{{4|}}}|{{# | </noinclude><onlyinclude>{{#if: {{{4|}}}|{{#switch {{lc:{{#dplvar:enhview}}}} | ||
|titleonly={{#if:{{{3|}}}|{{{3}}}|{{{2}}}}} | |||
|#default='''{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}:''' }}|{{#switch {{lc:{{#dplvar:enhview}}}} | |||
|titleonly=[[{{{1}}}|{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}]] | |||
|#default=[[{{{1}}}|'''{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}:''']] | |||
}}</onlyinclude> |
Revision as of 16:10, 10 December 2019
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|}} | {{#if: |{{#switch
|titleonly=Constitution +3 |#default=Constitution +3: }}|{{#switch |titleonly=Constitution +3 |#default=Constitution +3: }} |
{{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness}} | {{#if: |{{#switch
|titleonly=Curse of Clumsiness |#default=Curse of Clumsiness: }}|{{#switch |titleonly=Curse of Clumsiness |#default=Curse of Clumsiness: }} |
{{EnchTitle|Abilities#Constitution|Constitution -1|Curse of Clumsiness|True}} | {{#if: True|{{#switch
|titleonly=Curse of Clumsiness |#default=Curse of Clumsiness: }}|{{#switch |titleonly=Curse of Clumsiness |#default=Curse of Clumsiness: }} |
Usage[edit]
{{RenderEnchantmentTitle|(Page name)|(Title)|(Title Override)|(No Link)}}
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. |
Template
Ignore any errors below this line, The errors occur because there is no input into the template, in the template itself.
{{#if: |{{#switch |titleonly={{{2}}} |#default={{{2}}}: }}|{{#switch |titleonly=[[{{{1}}}|{{{2}}}]] |#default=[[{{{1}}}|{{{2}}}:]] }}