Template:ColoredLink: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
(more functionalities)
(Template Data)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>[[{{{link|{{{1|}}}}}}|<span style="{{TextColor|{{{color|{{{2|}}}}}}}};">{{{text|{{{3|{{{link|{{{1|}}}}}}}}}}}}</span>]]</includeonly><noinclude>Creates a basic colored link, so that you don't have to.</noinclude>
<includeonly>[[{{{link|{{{1|}}}}}}|<span style="{{TextColor|{{{color|{{{2|}}}}}}}};">{{{text|{{{3|{{{link|{{{1|}}}}}}}}}}}}</span>]]</includeonly><noinclude>Creates a colored link. The following formats are equal:
<pre>{{ColoredLink|Article's Original Name|Color|Optional Name for the Link}}</pre>
<pre>{{ColoredLink|link=Article's Original Name|color=Color|text=Optional Name for the Link}}</pre>
 
Note, uses "canon" colors from [[Template:TextColor]], not HTML color names for those redefined there. Use non-redefined names or other systems (e.g. HEX codes) to override this.
 
=== Examples ===
<pre>{{ColoredLink|Ship Histories|gold}}</pre>
{|style="background:#666" width=200
|align=center|{{ColoredLink|Ship Histories|gold}}
|}
 
<pre>{{ColoredLink|DS17 Non-Playing Character Listing|#B57EDC|DS17 NPCs}}</pre>
{|style="background:#666" width=200
|align=center|{{ColoredLink|DS17 Non-Playing Character Listing|#B57EDC|DS17 NPCs}}
|}
 
<pre>{{ColoredLink|link=USS Artemis-A/Science|text=Artemis Science Department|color=blue}}</pre>
{|style="background:#666" width=200
|align=center|{{ColoredLink|link=USS Artemis-A/Science|text=Artemis Science Department|color=blue}}
|}
 
 
{{Navbox|TITLE=Template Data|
<templatedata>
{
"params": {
"link": {
"aliases": [
"1"
],
"label": "Link",
"description": "Page where the link leads to",
"type": "wiki-page-name",
"required": true
},
"color": {
"aliases": [
"2"
],
"label": "Color",
"description": "Color of the link. Use \"canon\" colors or other color codes (e.g. HEX).",
"example": "blue",
"type": "line",
"suggested": true
},
"text": {
"aliases": [
"3"
],
"label": "Text",
"description": "Optional name for the link",
"type": "string"
}
},
"description": "Creates a colored link.",
"format": "inline"
}
</templatedata>}}
[[Category:Templates]]</noinclude>

Latest revision as of 22:06, 8 January 2024

Creates a colored link. The following formats are equal:

{{ColoredLink|Article's Original Name|Color|Optional Name for the Link}}
{{ColoredLink|link=Article's Original Name|color=Color|text=Optional Name for the Link}}

Note, uses "canon" colors from Template:TextColor, not HTML color names for those redefined there. Use non-redefined names or other systems (e.g. HEX codes) to override this.

Examples

{{ColoredLink|Ship Histories|gold}}
Ship Histories
{{ColoredLink|DS17 Non-Playing Character Listing|#B57EDC|DS17 NPCs}}
DS17 NPCs
{{ColoredLink|link=USS Artemis-A/Science|text=Artemis Science Department|color=blue}}
Artemis Science Department


Template Data

Creates a colored link.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Linklink 1

Page where the link leads to

Page namerequired
Colorcolor 2

Color of the link. Use "canon" colors or other color codes (e.g. HEX).

Example
blue
Linesuggested
Texttext 3

Optional name for the link

Stringoptional