Difference between revisions of "Template:ExpansionLink"

From Wikicarpedia
Jump to navigation Jump to search
Line 1: Line 1:
<noinclude>
<noinclude>
'''Description:'''<br/>
'''Description:'''<br/>
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.<br />
Create a link to expansion with expansion symbol. Allowed to hide logo, change design of logo and also set edition of expansion, which allows to create specific link to 1st edition and 2nd edition of same expansion.<br />
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.<br />
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.<br />
Main advantage will be, that usage of <code><nowiki>{{InnsCathedralsLink}}</nowiki></code> for {{InnsCathedralsLink}} will be used on each translated page and it will not be translated.<br />
Main advantage will be, that usage of <code><nowiki>{{InnsCathedralsLink}}</nowiki></code> for {{InnsCathedralsLink}} will be used on each translated page and it will not be translated.<br />
Line 18: Line 18:
| [[Template:TradersBuildersLink]] || Numbered expansion with difference between C1/C2 in expansion symbol
| [[Template:TradersBuildersLink]] || Numbered expansion with difference between C1/C2 in expansion symbol
|-
|-
| [[Template:CatapultLink]] || Numbered expansion, no version defined
| [[Template:CatapultLink]] || Numbered expansion, no e dditionefined
|-
|-
| [[Template:WheelFortuneLink]] || Not numbered expansion, no version defined
| [[Template:WheelFortuneLink]] || Not numbered expansion, no edition defined
|}
|}


Line 32: Line 32:
| {{InnsCathedralsLink}}
| {{InnsCathedralsLink}}
|-
|-
| Link to C1 version
| Link to C1 edition
| <code><nowiki>{{InnsCathedralsLink|version=C1}}</nowiki></code>
| <code><nowiki>{{InnsCathedralsLink|edition=C1}}</nowiki></code>
| {{InnsCathedralsLink|version=C1}}
| {{InnsCathedralsLink|edition=C1}}
|-
|-
| Hide expansion symbol
| Hide expansion symbol
Line 57: Line 57:
|-
|-
| No border, link to C1 and alternate text
| No border, link to C1 and alternate text
| <code><nowiki>{{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}</nowiki></code>
| <code><nowiki>{{InnsCathedralsLink|logo=noborder|edition=C1|text=Exp.1: I&C C1}}</nowiki></code>
| {{InnsCathedralsLink|logo=noborder|version=C1|text=Exp.1: I&C C1}}
| {{InnsCathedralsLink|logo=noborder|edition=C1|text=Exp.1: I&C C1}}
|}
|}


'''Params when calling specific expansion link template like <code><nowiki>{{InnsCathedralsLink}}</nowiki></code>:'''
'''Params when calling specific expansion link template like <code><nowiki>{{InnsCathedralsLink}}</nowiki></code>:'''
* <code>link</code> (mandatory): Link to expansion (default in new design)
* <code>link</code> (mandatory): Link to expansion (default in new design)
* <code>version</code> (optional): If set to C1, then parameters 'linkc1' will be used
* <code>edition</code> (optional): If set to C1, then parameters 'linkc1' will be used
* <code>linkc1</code> (optional): When version=C1 then this link will be used
* <code>linkc1</code> (optional): When edition=C1 then this link will be used
* <code>logo</code> (optional): Parameters for change design of logo like '''hide''' for hide logo, '''noborder''' to remove border arround expansion symbol
* <code>logo</code> (optional): Parameters for change design of logo like '''hide''' for hide logo, '''noborder''' to remove border arround expansion symbol
* <code>anchor</code> (optional): Anchor for specific part of expansion page, like link to Base_Game#The_Road
* <code>anchor</code> (optional): Anchor for specific part of expansion page, like link to Base_Game#The_Road
Line 74: Line 74:
* <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
<hr />
<hr />
</noinclude>{{#ifeq: {{{logo}}} | hide | | <span {{#ifeq: {{{logo}}} | noborder | | class="wica-white-box" style="display: inline-block; /*height: 20px;*/ padding: 2px 4px;" }}>{{#ifeq: {{{image}}} | none |<span style="width:16px; height: 16px; display: inline-block"></span> | [[File:{{{image}}}|16px|text-bottom|]]}}</span> }} [[{{#ifeq: {{{version}}} | C1 | {{{linkc1}}} | {{{link}}} }}{{#if: {{{anchor|}}}|&#35;{{{anchor}}}|}}|{{#if: {{{text|}}} | {{{text}}} | {{#if: {{{defaulttextprefix|}}} | {{{defaulttextprefix}}}&zwj; }} {{{defaulttext}}} }}]]
</noinclude>{{#ifeq: {{{logo}}} | hide | | <span {{#ifeq: {{{logo}}} | noborder | | class="wica-white-box" style="display: inline-block; /*height: 20px;*/ padding: 2px 4px;" }}>{{#ifeq: {{{image}}} | none |<span style="width:16px; height: 16px; display: inline-block"></span> | [[File:{{{image}}}|16px|text-bottom|]]}}</span> }} [[{{#ifeq: {{{edition}}} | C1 | {{{linkc1}}} | {{{link}}} }}{{#if: {{{anchor|}}}|&#35;{{{anchor}}}|}}|{{#if: {{{text|}}} | {{{text}}} | {{#if: {{{defaulttextprefix|}}} | {{{defaulttextprefix}}}&zwj; }} {{{defaulttext}}} }}]]

Revision as of 15:16, 23 May 2022

Description:
Create a link to expansion with expansion symbol. Allowed to hide logo, change design of logo and also set edition 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

Sources

Template Desciption
Template:InnsCathedralsLink Numbered expansion without difference between C1/C2 in name or expansion symbol
Template:TradersBuildersLink Numbered expansion with difference between C1/C2 in expansion symbol
Template:CatapultLink Numbered expansion, no e dditionefined
Template:WheelFortuneLink Not numbered expansion, no edition defined

Examples for {{InnsCathedralsLink}} or {{BageGameLink}}:

Request Code Output
{{InnsCathedralsLink}} Symbol InnsCathedrals C1C2.png Inns & Cathedrals
Link to C1 edition {{InnsCathedralsLink|edition=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
Link to specific anchor on page {{BaseGameLink|anchor=The_roads}} Symbol CarcassonneC.png Base Game
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|edition=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)
  • edition (optional): If set to C1, then parameters 'linkc1' will be used
  • linkc1 (optional): When edition=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
  • anchor (optional): Anchor for specific part of expansion page, like link to Base_Game#The_Road

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}}}]]