Template:Plain sister
This template is used on approximately 15,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
This template uses TemplateStyles: |
Background
This template provides a simple list of links to sister WMF projects.
- An interface to this template is already included in {{header}}, {{author}} and {{portal header}}. In the respective namespaces — Main, Author and Portal — you should use those templates and you should not use this template directly.
- Where the above header templates are not used this template is to be used.
- This template uses Module:Plain sister to construct the list.
Usage
{{Plain sister | textinfo = yes | portal = | related-author = | related-work = | wikipedia = | commons = | commonscat = | wikiquote = | wikinews = | wiktionary = | wikibooks = | wikiversity = | wikispecies = | wikivoyage = | wikidata = | meta = }}
Parameters
This template uses the following parameters. All parameters are optional. If no parameters are entered, relevant links will be accessed from Wikidata; if none is found, no output will be generated.
- Text info:
- When textinfotitle is set to any value, link to that page's associated talk page.
- When textinfotitle is unset but textinfo (or edition) is true, link to the associated talk page of the current page.
- portal: Link to the named portal. Multiple portals can be linked by using numbered parameters, e.g.
| portal1 = United States | portal2 = Australia
. - related-author: Link to the named author. Multiple authors can be linked by using numbered parameters, e.g.
| related-author1 = William Shakespeare (1564-1616) | related-author2 = Francis Bacon
. - related-work: Link to the named work. Multiple works can be linked by using numbered parameters.
- wikipedia: Link to Wikipedia (displays as article)
- commons: Link to Wikicommons (displays as media) )
- commonscat: An alternative link to Wikicommons, this links to a category instead of a gallery (displays as media category)
- wikiquote: Link to Wikiquote (displays as quotes)
- wikinews: Link to Wikinews (displays as news)
- wiktionary: Link to Wiktionary (displays as definition)
- wikibooks: Link to Wikibooks (displays as textbook)
- wikiversity: Link to Wikiversity (displays as course)
- wikispecies: Link to Wikispecies (displays as taxonomy)
- wikivoyage: Link to Wikivoyage (displays as travel guide)
- wikidata: Link to Wikidata (displays as data log). NB: Wikidata pages are referenced by an alphanumeric code.
- meta: Link to Meta (displays as meta)
- wikidataswitch: If set to anything (eg. "X"), this will enable a link to search for the page title on Wikidata (unless the page is already connected to Wikidata, which will prevent the creation of this link). This is not intended for manual use.
Wikidata
If a link is not specified manually using one of the above parameters, the template will check the page's associated Wikidata item for links. If any link is not found, the claims below will be used to find a relevant item and the first one to have a matching link will be used:
- edition or translation of (P629)
- category's main topic (P301)
- Wikimedia portal's main topic (P1204)
- main subject (P921)
For example: Stella Dallas (Prouty) has item Stella Dallas (Q106388874), which, as is common for "versions" items, does not have its own Wikipedia link. However, it has a edition or translation of (P629) claim leading to Stella Dallas (Q7607053), which does have a Wikipedia link: w:Stella Dallas (novel). Therefore, that will be the Wikipedia link for Stella Dallas (Prouty).
Examples
Basic
The template can be used as follows to create a single interwiki link, author link or portal link:
{{Plain sister | wikipedia = Test }}
{{Plain sister | portal = Portals }}
- related portals: Portals.
- sister projects: Wikipedia article, quotes, textbook, course, Wikidata item, Meta.
{{Plain sister | portal = Afghanistan/Albania/Algeria/Andorra/Angola/Antigua and Barbuda/Argentina/Armenia/Australia/Austria }}
- related portals: Afghanistan, Albania, Algeria, Andorra, Angola, Antigua and Barbuda, Argentina, Armenia, Australia, Austria.
- sister projects: Wikipedia article, quotes, textbook, course, Wikidata item, Meta.
{{Plain sister | related-author = William Shakespeare/Francis Bacon }}
- related authors: William Shakespeare, Francis Bacon.
- sister projects: Wikipedia article, quotes, textbook, course, Wikidata item, Meta.
Full
The template can also be used to display a collection of portal and interwiki links:
{{Plain sister | textinfo = true | portal = Portals/General Works/World History | related-author = William Shakespeare/Francis Bacon | wikipedia = Test | commons = Test | commonscat = Test | wikiquote = Test | wikinews = Test | wiktionary = Test | wikibooks = Test | wikiversity = Test | wikispecies = Test | wikivoyage = Test | wikidata = Q692 | meta = Test }}