Difference between revisions of "Template:ExpansionLink"

From Wikicarpedia
Jump to navigation Jump to search
m (Test)
Line 14: Line 14:
* Hide expansion symbol: <code><nowiki>{{InnsCathedralsLink|logo=hide}}</nowiki></code>: {{InnsCathedralsLink|logo=hide}}
* Hide expansion symbol: <code><nowiki>{{InnsCathedralsLink|logo=hide}}</nowiki></code>: {{InnsCathedralsLink|logo=hide}}
* Hide border arround expansion symbol: <code><nowiki>{{InnsCathedralsLink|logo=noborder}}</nowiki></code>: {{InnsCathedralsLink|logo=noborder}}
* Hide border arround expansion symbol: <code><nowiki>{{InnsCathedralsLink|logo=noborder}}</nowiki></code>: {{InnsCathedralsLink|logo=noborder}}
* Add number before numbered expansions: <code><nowiki>{{InnsCathedralsLink|variant=number}}</nowiki></code>: {{InnsCathedralsLink|variant=number}} which uses <code>defaulttextprefix</code> of <code><nowiki>{{Template:ExternalLink}}</nowiki></code>
* Alternate text to link: <code><nowiki>{{InnsCathedralsLink|text=Expansion 1: I&C}}</nowiki></code>: {{InnsCathedralsLink|text=Expansion 1: I&C}}
* Alternate text to link: <code><nowiki>{{InnsCathedralsLink|text=Expansion 1: I&C}}</nowiki></code>: {{InnsCathedralsLink|text=Expansion 1: I&C}}
* No border, link to C1 and alternate text: <code><nowiki>{{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}</nowiki></code>: {{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}
* No border, link to C1 and alternate text: <code><nowiki>{{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}</nowiki></code>: {{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}
Line 26: Line 27:
* <code>image</code> (mandatory): File with expansion symbol
* <code>image</code> (mandatory): File with expansion symbol
* <code>defaulttext</code> (mandatory): Default text for link
* <code>defaulttext</code> (mandatory): Default text for link
* <code>defaulttextprefix</code> (options): Add prefix before default text
* <code>text</code> (optional): User defined text when want to replace default text
* <code>text</code> (optional): User defined text when want to replace default text
</noinclude>{{#ifeq: {{{logo}}} | hide | | <span {{#ifeq: {{{logo}}} | noborder | | class="wica-white-box" style="display: inline-block; /*height: 20px;*/ padding: 2px 4px;" }}>[[File:{{{image}}}|16px|text-bottom|]]</span> }} [[{{#ifeq: {{{version}}} | C1 | {{{linkc1}}} | {{{link}}} }}|{{#if: {{{text|}}} | {{{text}}} | {{{defaulttext}}} }}]]
</noinclude>{{#ifeq: {{{logo}}} | hide | | <span {{#ifeq: {{{logo}}} | noborder | | class="wica-white-box" style="display: inline-block; /*height: 20px;*/ padding: 2px 4px;" }}>[[File:{{{image}}}|16px|text-bottom|]]</span> }} [[{{#ifeq: {{{version}}} | C1 | {{{linkc1}}} | {{{link}}} }}|{{#if: {{{text|}}} | {{{text}}} | {{#if: {{{defaulttextprefix|}}} | {{{defaulttextprefix}}}&nbsp; }} {{{defaulttext}}} }}]]

Revision as of 02:13, 26 April 2022

Description:
Create a link to expansion with expansion symbol. Allowed to hide logo, change design of logo and also set version of expansion, which allows to create specific link to 1st edition and 2nd edition of same expansion.
This Template will be not used directly on WiCa pages, but it will be created on separately created templates made for every expansion which will be set to translate.
Main advantage will be, that usage of {{InnsCathedralsLink}} for Symbol InnsCathedrals C1C2.png Inns & Cathedrals will be used on each translated page and it will not be translated.
But if it will be necessary, it can create specific text for link like Symbol InnsCathedrals C1C2.png Updated text to Inns & Cathedrals

Attention:
Expansion links templates is translated on specific template page like Template:InnsCathedralsLink

Examples for {{InnsCathedralsLink}}:

  • Default: {{InnsCathedralsLink}}: Symbol InnsCathedrals C1C2.png Inns & Cathedrals
  • Link to C1 version: {{InnsCathedralsLink|version=C1}}: Symbol InnsCathedrals C1C2.png Inns & Cathedrals
  • Hide expansion symbol: {{InnsCathedralsLink|logo=hide}}: Inns & Cathedrals
  • Hide border arround expansion symbol: {{InnsCathedralsLink|logo=noborder}}: Symbol InnsCathedrals C1C2.png Inns & Cathedrals
  • Add number before numbered expansions: {{InnsCathedralsLink|variant=number}}: Symbol InnsCathedrals C1C2.png Exp. 1 which uses defaulttextprefix of {{Template:ExternalLink}}
  • Alternate text to link: {{InnsCathedralsLink|text=Expansion 1: I&C}}: Symbol InnsCathedrals C1C2.png Expansion 1: I&C
  • No border, link to C1 and alternate text: {{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}: Symbol InnsCathedrals C1C2.png Exp.1: I&C C1

Params when calling specific expansion link template like {{InnsCathedralsLink}}:

  • link (mandatory): Link to expansion (default in new design)
  • version (optional): If set to C1, then parameters 'linkc1' will be used
  • linkc1 (optional): When version=C1 then this link will be used
  • logo (optional): Parameters for change design of logo like hide for hide logo, noborder to remove border arround expansion symbol

Internal Params used only inside expansion link templates and not used when calling {{InnsCathedralsLink}}:

  • image (mandatory): File with expansion symbol
  • defaulttext (mandatory): Default text for link
  • defaulttextprefix (options): Add prefix before default text
  • text (optional): User defined text when want to replace default text

[[File:{{{image}}}|16px|text-bottom|]] [[{{{link}}}|{{{defaulttext}}}]]