Cannabis Ruderalis

Content deleted Content added
See also
update documentation, add TemplateData
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->

The template name is <nowiki>"{{Twitter}}"</nowiki>. It is used to link articles to a particular [[Twitter]] account, by the account's [[Uniform Resource Locator|URL]] and title.
This template generates an external link to an account at [[Twitter]].


==Usage==
{{See also|Wikipedia:External links/Perennial websites}}
{{See also|Wikipedia:External links/Perennial websites}}


Line 10: Line 10:
Wikipedia is [[WP:NOTDIR|not a comprehensive directory of a subject's web presence]]. Linking to Twitter and social networking sites is discouraged if the links are easily found at the subject's main website or other official link.
Wikipedia is [[WP:NOTDIR|not a comprehensive directory of a subject's web presence]]. Linking to Twitter and social networking sites is discouraged if the links are easily found at the subject's main website or other official link.


===Single parameter===
== Usage ==
One parameter:
If only one parameter is used in the template, this parameter will be the page's url, with the link being the name of the Wikipedia page used on. Example:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>


Two parameters:
<nowiki>{{Twitter|Wikipedia}}</nowiki>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
produces
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
*{{Twitter|Wikipedia}}


== Examples ==
Since "Twitter" is the name of the Wikipedia page you now are looking at, the link above shows "Twitter on Twitter" for the Wikipedia page. The lead name will change according to the name of the Wikipedia page used on. Also, the template links to <tt>https://twitter.com/Wikipedia</tt>, whilst the link itself displays the current page name.


===Two parameters===
===One parameter===
If two parameters are used in the template, the first parameter will be the page's url, while the second will be the title of the link. Example:
This parameter will be the ID string used in the [[URL]] at Twitter. When one parameter is used, the [[link text]] is the title of the Wikipedia article where the template is used.


<nowiki>{{Twitter|Wikipedia|The World's best website}}</nowiki>
: URL: <code><nowiki>https://</nowiki>twitter.com/{{hilite|Wikipedia}}</code>
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | Wikipedia }}</code>
produces
#: {{{{BASEPAGENAME}} | Wikipedia }}
*{{twitter|Wikipedia|The World's best website}}
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= Wikipedia }}</code>
#: {{{{BASEPAGENAME}} | id= Wikipedia }}


Since "Twitter" is the name of the Wikipedia page you now are looking at, the link above shows "Twitter on Twitter" for the Wikipedia page. The lead name will change according to the name of the Wikipedia page used on.
The template links to <tt>https://twitter.com/Wikipedia</tt>, whilst the link itself displays "The World's best website".

===Two parameters===
The first parameter will be the ID string used in the [[URL]] at Twitter. The second parameter will be used at the [[link text]].


: URL: <code><nowiki>https://</nowiki>twitter.com/{{hilite|AcadiaU}}</code>
Likewise:
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | AcadiaU | Acadia University }}</code>
#: {{{{BASEPAGENAME}} | AcadiaU | Acadia University }}
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= AcadiaU | name= Acadia University }}</code>
#: {{{{BASEPAGENAME}} | id= AcadiaU | name= Acadia University }}


== Template data ==
<nowiki>{{Twitter|Wikipedia|@Wikipedia}}</nowiki>
{{TemplateDataHeader}}
produces
<templatedata>
*{{twitter|Wikipedia|@Wikipedia}}
{
"description": "This template generates an external link to an account at Twitter.",
"params": {
"id": {
"label": "ID",
"description": "ID string used in the URL.",
"type": "string",
"required": true,
"aliases": [ "1" ]
},
"name": {
"label": "Name",
"description": "Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.",
"type": "string",
"required": false,
"aliases": [ "2" ]
}
}
}
</templatedata>


== See also ==
== See also ==
Line 42: Line 73:
* [[Wikipedia:TWITTER]]
* [[Wikipedia:TWITTER]]


<includeonly><!--
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!--Categories below this line, please; interwikis at Wikidata-->
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
{{DEFAULTSORT:Twitter}}
{{DEFAULTSORT:Twitter}}
[[Category:Templates for linking to a social networking site]]
[[Category:Templates for linking to a social networking site]]
</includeonly>
}}</includeonly>

Revision as of 05:17, 27 September 2014

This template generates an external link to an account at Twitter.

The external links guideline recommends avoiding links to Twitter unless the Twitter feed is an official account "controlled by the subject (organization or individual person) of the Wikipedia article". Multiple hoax and "fan" accounts have been discovered; please make a particular effort to verify the authenticity of any official links. Legitimate Twitter accounts are usually named in reliable sources, such as newspaper stories, about the subject, or linked by other subject-controlled sources.

Wikipedia is not a comprehensive directory of a subject's web presence. Linking to Twitter and social networking sites is discouraged if the links are easily found at the subject's main website or other official link.

Usage

One parameter:

{{Twitter | ID }}
{{Twitter | id= ID }}

Two parameters:

{{Twitter | ID | NAME }}
{{Twitter | id= ID | name= NAME }}

Examples

One parameter

This parameter will be the ID string used in the URL at Twitter. When one parameter is used, the link text is the title of the Wikipedia article where the template is used.

URL: https://twitter.com/Wikipedia
  1. {{Twitter | Wikipedia }}
    Twitter/doc on X
  2. {{Twitter | id= Wikipedia }}
    Twitter/doc on X

Since "Twitter" is the name of the Wikipedia page you now are looking at, the link above shows "Twitter on Twitter" for the Wikipedia page. The lead name will change according to the name of the Wikipedia page used on.

Two parameters

The first parameter will be the ID string used in the URL at Twitter. The second parameter will be used at the link text.

URL: https://twitter.com/AcadiaU
  1. {{Twitter | AcadiaU | Acadia University }}
    Acadia University on X
  2. {{Twitter | id= AcadiaU | name= Acadia University }}
    Acadia University on X

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Twitter in articles based on its TemplateData.

TemplateData for Twitter

This template generates an external link to an account at Twitter.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

ID string used in the URL.

Stringrequired
Namename 2

Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.

Stringoptional

See also


Leave a Reply