Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Help:What links here

Page semi-protected
From Wikipedia, the free encyclopedia
(Redirected fromWikipedia:WHATLINKSHERE)

Wikipedia information page
This is aninformation page.
It is not anencyclopedic article, nor one ofWikipedia's policies or guidelines; rather, its purpose is to explain certain aspects of Wikipedia's norms, customs, technicalities, or practices. It may reflect differing levels ofconsensus andvetting.
Linking and
page manipulation

Within the Tools section at the top-right of every page (in thestandard view) is a link labeled "What links here". This is used to see a list of the pages thatlink to (orredirect to, ortransclude) the current page. These are sometimes referred to asbacklinks.

It is possible to make a wikilink to the "What links here" list for a particular page; to do this type[[Special:WhatLinksHere/Page name]], replacingPage name with the title of the target page. (The same text, without the square brackets, can also be entered in the search box, to access "What links here" for any page title.)

It is also possible to list the pages with{{Special:WhatLinksHere/Page name|namespace=number}}, wherePage name is the name of the page, andnamespace (optional) isthe number of the namespace. E.g.{{Special:WhatLinksHere/Help:What links here|namespace=0}} lists all pages from article space that link to this page.

To use the tool, clickSpecial:WhatLinksHere and type in the page title.

"What links here" is limited to showing actual backlinks. Pages which contain the title being searched for, but where the title has not been linked, are not included in the results. An alternative script (User:Lourdes/Backlinks) exists to search for such pages, where possible unlinked backlinks may exist for the respective article.

Overview

The "What links here" facility lists the pages on the same site (English Wikipedia) which link to (orredirect to, ortransclude) a given page. It is possible to limit the search to pages in a specifiednamespace. To see this information, click the "What links here" link (or shortcutAlt+⇧ Shift+j) while looking at any page. The list is sorted by page ID, i.e., by date of creation of the page.

This information comes from thepagelinks table and thetemplatelinks table. Pages redirected to the given page are marked "redirect". Pages transcluding the given page are marked "transclusion"; for these pages, it is not shown whether they alsolink to the given page. For image and other file pages, the pages using the image or file appear on the list and are marked "image link".

The parser function#ifexist: causes a listing in "What links here" among the normal links, even though no link is produced.

The list of links to an article is useful in a number of ways:

  • The number of incoming links gives a rough indication of how important or popular a page is.
  • Where the intended subject material of an article is unclear, the list of articles linking to it might provide useful context.
  • It facilitates properdisambiguation.

The function works even for a page title that does not exist (recordingredlinks to that title). The "What links here" link appears on the edit page on which one arrives when following a broken link. Thus, for example, if film articles are linked to the actors, one can find the films an actor has played in even if there is no article about the actor.

To invoke a "What links here" list directly (in the search box, browser address bar, or wikilinks) use the syntaxSpecial:WhatLinksHere/John Smith (replacing "John Smith" with the desired target article title).

Limitations

The following arenot listed at "What links here":

Fragments

In the case of links tosections or otheranchors (that is:URI fragments), the precise target is not shown. Furthermore, "What links here" cannot list the backlinks of a specific section/anchor only. For instance, it is not possible to search for a links specifically to the section calledBar in a page calledFoo by searching forFoo#Bar on the "What links here" page. Nor will searching forFoo on the "What links here" page tell you which links link to which sections inFoo. This is an unfortunate limitation, as it limits the ability to see if links need to be changed (oranchors need to be created matching the old section names) when a section's name is changed.

Workarounds:

  • Typically, this type of link can be detected with an insource search, e.g.https://en.wikipedia.org/w/index.php?search=linksto%3A%22foo%22%20insource%3A%2F%5C%5B%5C%5B%22foo%22%5C%23%22bar%22(%5C%5D%5C%5D%7C%5C%7C)%2Fi&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1&ns1=1 (note that this method will not catch all possible permutations of a section link, if used naively).
  • Since the "What links here" pagedoes list redirects to a sections in the page, another possible workaround is making a new title that redirects to a particular section, and encouraging people to make links to the redirect rather than the section. For instance, making aBar (Foo) page that redirects toFoo#Bar. An additional benefit to this is that if the title of theBar section on theFoo page ever changes, all pages that link toBar (Foo) will link to the correct place once the redirect target ofBar (Foo) is updated.
  • Another possibility is to useLinksearch to detect section links, but here editors would have to add hidden external links, as linksearch only detects links made with the external link syntax.

Backlinks

As mentioned, backlinks which have not yet been linked are excluded from the results. Analternative script exists to search out such pages.

Also note that if a page's links change because of a change in atemplate, the backlinks for that page arenot updated immediately, but via the job queue.

Redirects

The What links here report will list aredirect to a page, and indented under it any incoming links to the page that go through that redirect.

For a double redirect, the indent is double, and any incoming wikilinks to the page that go through the two intervening redirects are then shown triple indented. Although they are shown, double redirects are cleaned up; any triple redirects will become doubles, so triple redirects are not shown, just doubles.

For a demonstration, see theWhat links here report for this page.Double redirects and redirects to sections are set up at/demo rdcheck.

Only show incoming redirects

To only show incoming links, click on "What links here" and then click both "Hide transclusions" and "Hide links".

To hide incoming redirects, click on "Hide redirects".

Transclusions

The backlinks list includestransclusions of the current page.

It also includes links which exist on certain pages because the page transcludes another page (template). For example, if page A transcludes template B, and B contains a link to C (not contained within <noinclude> tags), then the link to C will appear on page A, and A will be listed among the backlinks of C.

It is possible that a page contains a link to C because it transcludes a template even though the template does not itself contain such a link (the link may be produced in the template wikitext by the application of variousparser functions, rather than explicitly). In this case the template will not show up in the backlinks of C, although pages on which it is transcluded will (if they have the links to C). It may be convenient to make the template appear on the list by placing a link to C on the template, within <noinclude> tags.

Number of links

The "What links here" page does not display how many backlinks exist in total. The number of links displayed at one time is limited – initially to 50, although there are links to change this to certain other values. (Different values can be obtained by editing the URL resulting from clicking these links, but the maximum possible value is 5,000.)

Extensions and programming

Number of backlinks

The "What links here" page body has selector body.page-Special_Whatlinkshere, so for example we can use theCSSbody.page-Special_Whatlinkshere ul { list-style: decimal } to number the backlinks.

It is possible to obtain the list of backlinks (with additional information) programmatically using the MediaWiki API. For information on how to do this, see theAPI documentation.

Semantic relations

With the extensionSemantic MediaWiki (SMW) links are categorized by specifying relations. For a given relation the backlinks of a page can be produced in-page. A series of queries, one for each relation (which seems cumbersome but can be put in a template like[1]), provides an in-page list of backlinks sorted by relation. Moreover, forward links and attributes of the resulting pages can also be provided, and also backlinks of backlinks.

DPL method

A simpler extension that can embed backlinks (without the semantic functionality) isDynamic Page List.EXAMPLE NEEDED

Suppress links

"(← links | edit)" can be suppressed by placing the following in Common.css

.mw-whatlinkshere-tools{display:none;}

However, "(transclusion)" can't be suppressed with that CSS. Maybe with CSS# positional-selection.

Transclusion of WhatLinksHere

Special:WhatLinksHere/Example page can be transcluded with{{Special:WhatLinksHere/Example page}} which produces:

If you want to exclude redirects, you can use{{Special:WhatLinksHere/Example page|hideredirs=1}}. There are three params you can use (in any order, or combination) for hiding redirects, transclusions, or normal links:

  • {{Special:WhatLinksHere/Example page|hideredirs=1}}
  • {{Special:WhatLinksHere/Example page|hidetrans=1}}
  • {{Special:WhatLinksHere/Example page|hidelinks=1}}

Workaround to hide transcluded links

It is a known limitation that there is no way to filter out pages that link to the current page via a transcluded template. This limits the usefulness of "What links here" in cases where a page is linked to from a widely transcluded navbox. A workaround is to perform asearch using theinsource parameter, e.g. useinsource:/\[\[[Ff]oo/ to search for articles that contain links toFoo (either direct links,[[Foo]] and[[foo]], orpiped links,[[Foo|label]] and[[foo|label]]). A user script,User:PrimeHunter/Source links.js, simplifies this process by providing a link to automatically perform the search.

Examples

See also

General
technical help
Special
page
-related
Wikitext
Links anddiffs
Media files: images,
videos and sounds
Other graphics
Templates and
Lua modules
Data structure
HTML andCSS
Customisation
and tools
Automated editing
Retrieved from "https://en.wikipedia.org/w/index.php?title=Help:What_links_here&oldid=1278791506"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp