Template:TrophyLink: Difference between revisions

From CrossCode Wiki
Jump to navigation Jump to search
(TrophyLink)
 
(Category fixed: AutoRenamedTrophy)
 
Line 16: Line 16:
-->{{#ifeq:{{WsBool|{{{nowrap}}}|1}}|1|<span class="nowrap" style="white-space: nowrap;">}}<!--
-->{{#ifeq:{{WsBool|{{{nowrap}}}|1}}|1|<span class="nowrap" style="white-space: nowrap;">}}<!--
2. rename category
2. rename category
-->{{#ifeq:{{#expr:{{WsBool|{{{noRename}}}}} or {{#if:{{{showName|}}}|1|0}}}}|0|{{#ifeq:{{TrophyLink/nameList|{{{1}}}}}|{{{1}}}||[[Category:AutoRenamedItem]]}}}}<!--
-->{{#ifeq:{{#expr:{{WsBool|{{{noRename}}}}} or {{#if:{{{showName|}}}|1|0}}}}|0|{{#ifeq:{{TrophyLink/nameList|{{{1}}}}}|{{{1}}}||[[Category:AutoRenamedTrophy]]}}}}<!--
3. link start
3. link start
-->{{#ifeq:{{WsBool|{{{noLink}}}}}|0|{{lo}}{{TrophyLink/linkList|{{{1}}}}}{{TrophyLink/anchorList|{{{1}}}}}{{!}}}}<!--
-->{{#ifeq:{{WsBool|{{{noLink}}}}}|0|{{lo}}{{TrophyLink/linkList|{{{1}}}}}{{TrophyLink/anchorList|{{{1}}}}}{{!}}}}<!--

Latest revision as of 18:27, 29 October 2017

File:Template-info.svg Template Documentation

This is a template for adding links to trophies.

About

Add a link to the Trophy. There are many possibitities to customize the behavior.

Parameter

Trophy name

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Trophy Name 1

Trophy name

Default:
NULL
Example:
Platin Trophy
{{TrophyLink|Platin Trophy}}
String Required
Show Name showName

Shows the defined name/Overrides the Trophy-Name (alternative Name)

Default:
NULL
Example:
Other Trophy
{{TrophyLink|Platin Trophy|showName=Other Trophy}}
String Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Wrap behavior

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Disable brakes nowrap

disable or enable Nowrap (prevent line breaks)

Default:
1
Example:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Platin Trophy Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{TrophyLink|Platin Trophy|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Hide ans show elements

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
No Link noLink

Removes the link

Default:
0
Example:
Platin Trophy
{{TrophyLink|Platin Trophy|noLink=1}}
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Disable auto-rename

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
No Rename noRename

disable or enable noRename (prevent auto-rename)

Default:
0
Example:
noRename: Platin Trophy Rename: Platin Trophy
noRename: {{ITrophyLink|Platin Trophy|noRename=1}} Rename: {{TrophyLink|Platin Trophy|noRename=0}}
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Return information (internal use)

Do not use named parameter for 1 ... x. The first Parameter will be automatically marked as 1, the second as 2 and so on.

Parameter Description Type Status
Anchor Override anchorOverride

Internal use only (return the anchor-name) - overrides all other parameter except linkOverride and nowrap

Default:
0
Example:
Platin Trophy
{{TrophyLink|Platin Trophy|anchorOverride=1}}
Chapter 02 Complete
{{TrophyLink|Chapter 02 Complete|anchorOverride=1}}
Boolean Optional
Link Override linkOverride

Internal use only (return the link) - overrides all other parameter and anchorOverride

Default:
0
Example:
Trophies#Platin Trophy
{{TrophyLink|Platin Trophy|linkOverride=1}}
Boolean Optional

See Template:TemplateData and Template:TemplateData/entry for more information about the parameter list and DDNCode for more information about types and the DDN Notation

Test of raw TemplateData output:

No description.

Template parameters

ParameterDescriptionTypeStatus
Trophy Name1

Trophy name

Example
<span class="nowrap" style="white-space: nowrap;">[[Trophies#Platin Trophy|Platin Trophy]]</span>
{{TrophyLink|Platin Trophy}}
Stringrequired
Show NameshowName

Shows the defined name/Overrides the Trophy-Name (alternative Name)

Example
<span class="nowrap" style="white-space: nowrap;">[[Trophies#Platin Trophy|Other Trophy]]</span>
{{TrophyLink|Platin Trophy|showName=Other Trophy}}
Stringoptional
Disable brakesnowrap

disable or enable Nowrap (prevent line breaks)

Default
1
Example
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. [[Trophies#Platin Trophy|Platin Trophy]] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{TrophyLink|Platin Trophy|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Booleanoptional
No LinknoLink

Removes the link

Default
0
Example
<span class="nowrap" style="white-space: nowrap;">Platin Trophy</span>
{{TrophyLink|Platin Trophy|noLink=1}}
Booleanoptional
No RenamenoRename

disable or enable noRename (prevent auto-rename)

Default
0
Example
noRename: <span class="nowrap" style="white-space: nowrap;">[[Trophies#Platin Trophy|Platin Trophy]]</span> Rename: <span class="nowrap" style="white-space: nowrap;">[[Trophies#Platin Trophy|Platin Trophy]]</span>
noRename: {{ITrophyLink|Platin Trophy|noRename=1}} Rename: {{TrophyLink|Platin Trophy|noRename=0}}
Booleanoptional
Anchor OverrideanchorOverride

Internal use only (return the anchor-name) - overrides all other parameter except linkOverride and nowrap

Default
0
Example
Platin Trophy
{{TrophyLink|Platin Trophy|anchorOverride=1}}
Chapter 02 Complete
{{TrophyLink|Chapter 02 Complete|anchorOverride=1}}
Booleanoptional
Link OverridelinkOverride

Internal use only (return the link) - overrides all other parameter and anchorOverride

Default
0
Example
Trophies#Platin Trophy
{{TrophyLink|Platin Trophy|linkOverride=1}}
Booleanoptional

Default Trophy

If an item is misspelled, does not exist or simply has not been added to the template yet, it will link to the Trophies page (foo).

Name

Names containing special characters are supported.

It is possible that the name appears different than that entered one:

{{TrophyLink|x}}
Raw Steak will be displayed as x. In these cases they are marked with an r (for renamed). All renamed Trophies will be listet in the category AutoRenamedTrophy.
* {{TrophyLink|x}}

Wikimedia supports linktrail which allows to add specific characters to an link:

[[Hedgehag]]s

Hedgehags

Under specific conditions (parameter nowrap=0 is needed) Linktrail is supported by TrophyLink:

{{TrophyLink|Platin Trophy|nowrap=0}}s

Platin Trophys

If nowrap is necessary:

{{Nowrap|{{TrophyLink|Platin Trophy|nowrap=0}}s}}

Platin Trophys

Linktrail and renamed Trophies:

{{TrophyLink|Platin Trophy x|nowrap=0}}s

Platin Trophy xs

Item Lists

List Description
Template:TrophyLink/nameList Contains all Trophies which should be Renamed
Template:TrophyLink/anchorList Contains all Trophies which anchor should be Renamed
Template:TrophyLink/linkList Contains all Links to the Trophy Pages

Rules for the Trophy Lists

  • Only subsections should be editied
  • Achor Nameing rules:
    • Whitspace = _
    • English Item-names only
    • Only use the special characters _ and -
    • Remove all other special Chars like ' . , # ; < > ( ) { } / \
    • Remove all - if they are at first position: -Item -> Item
  • Don't be shy. If there is a missing Trophy, add it.

Examples

Code Result
{{TrophyLink|Platin Trophy}}
Platin Trophy
{{TrophyLink|Platin Trophy}}
Platin Trophy
{{TrophyLink|Platin Trophy}}
Platin Trophy
{{TrophyLink|Platin Trophy|showName=Platin Trophy rename|noLink=1}}
Platin Trophy rename