Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Wiki/doc: Difference between revisions

Template page
mNo edit summary
update template documentation. underscores no longer required for template to work
 
Line 1: Line 1:
<includeonly>Template doc page transcluded from {{SUBJECTPAGENAME}}/doc</includeonly><noinclude>Documentation for [[Template:Wiki]]</br></br></noinclude>
<includeonly>Template doc page transcluded from {{SUBJECTPAGENAME}}/doc</includeonly><noinclude>Documentation for [[Template:Wiki]]</br></br></noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
== Usage ==
A template for links to Wikipedia, provides a distinct color to discriminate from wikilinks (like [[Destiny]]) and other external links (like [https://www.reddit.com/r/Daliban/comments/1cs5wzz/3/ Destiny]).


== Useage ==
Any questions regarding this template can be directed to [[User:Devonnn]] at [[User talk:Devonnn]] or in the #dgg-wiki channel in the Destiny discord.
A template for links to wikipedia, provides a distinct color to discriminate from wikilinks (like [[Destiny]]) and other external links (like [https://www.reddit.com/r/Daliban/comments/1cs5wzz/3/ Destiny]).
 
Currently, include underscores (as applicable) in parameter one.
 
Any questions can be directed to [[User:Devonnn]].


:<code><nowiki>{{wiki|1|2|3}}</nowiki></code>
:<code><nowiki>{{wiki|1|2|3}}</nowiki></code>
Line 13: Line 10:
:<code><nowiki>{{wiki|url|alternate name|non linked}}</nowiki></code>
:<code><nowiki>{{wiki|url|alternate name|non linked}}</nowiki></code>


Parameters 2 and 3 are optional and do note need a pipe (<code>|</code>) if not in use, e.g. <code><nowiki>{{wiki|bat}}</nowiki></code> rather than <code><nowiki>{{wiki|bat||}}</nowiki></code>.
Parameters 2 and 3 are optional and do not need a pipe (<code>|</code>) if not in use (i.e. <code><nowiki>{{wiki|bat}}</nowiki></code> rather than <code><nowiki>{{wiki|bat||}}</nowiki></code>.)


== Parameters ==
== Parameters ==
{| class="wikitable"
<templatedata>
{{!}}-
{
! Parameter || Description || Type|| Status
"params": {
{{!}}-
"1": {
{{!}} 1 || Wikipedia page you are linking to. || content || required
"label": "Wikipedia page name",
{{!}}-
"description": "The Wikipedia page you are linking to. THIS FIELD IS CASE SENSITIVE.",
{{!}} 2 {{!!}} Alternate link name. || content || optional
"example": "Destiny (streamer)",
{{!}}-
"type": "wiki-page-name",
{{!}} 3 || Non-linked characters. || content || optional
"required": true
|}
},
"2": {
"label": "Display name",
"description": "An optional display name for the link you are about to create.",
"example": "Destiny",
"type": "content"
},
"3": {
"label": "Non-linked characters. ",
"description": "Used for periods, commas, etc. so that they are not colored.",
"type": "content"
}
},
"paramOrder": [
"1",
"2",
"3"
],
"format": "inline"
}
</templatedata>


== Examples ==
== Examples ==
If the article has a space, make it an underscore and set parameter 2 to be the actual name you want (or if you want a different name entirely. For example,
If the article has a space, make it an underscore and set parameter 2 to be the actual name you want (or if you want a different name entirely. For example,


<code><nowiki>{{wiki|Destiny_(streamer)|Destiny}}</nowiki></code> will output {{wiki|Destiny_(streamer)|Destiny}}
<code><nowiki>{{wiki|Destiny (streamer)|Destiny}}</nowiki></code> will output {{wiki|Destiny (streamer)|Destiny}}


----
----
And carries over for something like
And carries over for something like


<code><nowiki>{{wiki|Destiny_(streamer)|Wiki-warrior number 1}}</nowiki></code> will output {{wiki|Destiny_(streamer)|Wiki-warrior number 1}}
<code><nowiki>{{wiki|Destiny (streamer)|Wiki-warrior number 1}}</nowiki></code> will output {{wiki|Destiny (streamer)|Wiki-warrior number 1}}


----
----
If you dont include a 2nd parameter, it will look as entered (it will set the shortened name of the link to the last part of the hyperlink, e.g.
If you dont include a 2nd parameter, it will look as entered (it will set the shortened name of the link to the last part of the hyperlink, e.g.


<code><nowiki>{{wiki|Destiny_(streamer)}}</nowiki></code> will output {{wiki|Destiny_(streamer)}}
<code><nowiki>{{wiki|Destiny streamer)}}</nowiki></code> will output {{wiki|Destiny (streamer)}}


This works fine for single word articles.
This works fine for single word articles.
Line 47: Line 64:
The third parameter can be used for any required punctuation, as to not have the Wikipedia logo awkwardly separate the logo.
The third parameter can be used for any required punctuation, as to not have the Wikipedia logo awkwardly separate the logo.


Additionally someone like <code><nowiki>{{wiki|Destiny_(streamer)|Destiny|,}}</nowiki></code> an advocate for peace in the middle east, would not support waffle ice cream cones.
Additionally someone like <code><nowiki>{{wiki|Destiny (streamer)|Destiny|,}}</nowiki></code> an advocate for peace in the middle east, would not support waffle ice cream cones.


would result in the following:
would result in the following:


Additionally someone like {{wiki|Destiny_(streamer)|Destiny|,}} an advocate for peace in the middle east, would not support waffle ice cream cones.
Additionally someone like {{wiki|Destiny (streamer)|Destiny|,}} an advocate for peace in the middle east, would not support waffle ice cream cones.




However, when using something like an em dash (—) it will probably be better to skip the 3rd parameter.
However, when using something like an em dash (—) it will probably be better to skip the 3rd parameter.


Additionally someone like <code><nowiki>{{wiki|Destiny_(streamer)|Destiny}}</nowiki></code>—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.
Additionally someone like <code><nowiki>{{wiki|Destiny  (streamer)|Destiny}}</nowiki></code>—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.


would result in the following:
would result in the following:


Additionally someone like {{wiki|Destiny_(streamer)|Destiny}}—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.
Additionally someone like {{wiki|Destiny (streamer)|Destiny}}—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.

Latest revision as of 18:33, 23 October 2024

Documentation for Template:Wiki

Usage

A template for links to Wikipedia, provides a distinct color to discriminate from wikilinks (like Destiny) and other external links (like Destiny).

Any questions regarding this template can be directed to User:Devonnn at User talk:Devonnn or in the #dgg-wiki channel in the Destiny discord.

{{wiki|1|2|3}}
{{wiki|url|alternate name|non linked}}

Parameters 2 and 3 are optional and do not need a pipe (|) if not in use (i.e. {{wiki|bat}} rather than {{wiki|bat||}}.)

Parameters

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Wikipedia page name1

The Wikipedia page you are linking to. THIS FIELD IS CASE SENSITIVE.

Example
Destiny (streamer)
Page namerequired
Display name2

An optional display name for the link you are about to create.

Example
Destiny
Contentoptional
Non-linked characters. 3

Used for periods, commas, etc. so that they are not colored.

Contentoptional

Examples

If the article has a space, make it an underscore and set parameter 2 to be the actual name you want (or if you want a different name entirely. For example,

{{wiki|Destiny (streamer)|Destiny}} will output Destiny Wikipedia


And carries over for something like

{{wiki|Destiny (streamer)|Wiki-warrior number 1}} will output Wiki-warrior number 1 Wikipedia


If you dont include a 2nd parameter, it will look as entered (it will set the shortened name of the link to the last part of the hyperlink, e.g.

{{wiki|Destiny streamer)}} will output Destiny (streamer) Wikipedia

This works fine for single word articles.


The third parameter can be used for any required punctuation, as to not have the Wikipedia logo awkwardly separate the logo.

Additionally someone like {{wiki|Destiny (streamer)|Destiny|,}} an advocate for peace in the middle east, would not support waffle ice cream cones.

would result in the following:

Additionally someone like Destiny, Wikipedia an advocate for peace in the middle east, would not support waffle ice cream cones.


However, when using something like an em dash (—) it will probably be better to skip the 3rd parameter.

Additionally someone like {{wiki|Destiny (streamer)|Destiny}}—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.

would result in the following:

Additionally someone like Destiny Wikipedia—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.