Template:Wiki/doc: Difference between revisions
More actions
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]). | |||
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. | |||
:<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 | 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 == | ||
{ | <templatedata> | ||
{ | { | ||
"params": { | |||
"1": { | |||
"label": "Wikipedia page name", | |||
"description": "The Wikipedia page you are linking to. THIS FIELD IS CASE SENSITIVE.", | |||
"example": "Destiny (streamer)", | |||
"type": "wiki-page-name", | |||
{ | "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| | <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| | <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| | <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| | 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| | 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| | 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| | 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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Wikipedia page name | 1 | The Wikipedia page you are linking to. THIS FIELD IS CASE SENSITIVE.
| Page name | required |
| Display name | 2 | An optional display name for the link you are about to create.
| Content | optional |
| Non-linked characters. | 3 | Used for periods, commas, etc. so that they are not colored. | Content | optional |
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
And carries over for something like
{{wiki|Destiny (streamer)|Wiki-warrior number 1}} will output 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.
{{wiki|Destiny streamer)}} will output Destiny (streamer)
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,
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
—an advocate for peas in the middle east—would not support the shipment of lima beans into the Gaza strip.