Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:What links here
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Extensions and programming== === Number of backlinks === The "What links here" page body has selector body.page-Special_Whatlinkshere, so for example we can use the [[Help:Cascading Style Sheets|CSS]] <code>body.page-Special_Whatlinkshere ul { list-style: decimal }</code> 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 the [[mw:API:Backlinks|API documentation]]. === Semantic relations === With the extension [[Semantic 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 [http://semanticweb.org/wiki/Template:Ask]), 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) is [[mw:Dynamic Page List|Dynamic Page List]]. '''EXAMPLE NEEDED''' === Suppress links === "(β links | edit)" can be suppressed by placing the following in Common.css <syntaxhighlight lang="css"> .mw-whatlinkshere-tools{ display:none; }</syntaxhighlight> '''However, "(transclusion)" can't be suppressed with that CSS. Maybe with CSS# positional-selection.''' === Transclusion of WhatLinksHere === {{anchor|Transclusion}} [[Special:WhatLinksHere/Example page]] can be transcluded with <code><nowiki>{{Special:WhatLinksHere/Example page}}</nowiki></code> which produces: {{Special:WhatLinksHere/Example page}} If you want to exclude redirects, you can use <code><nowiki>{{Special:WhatLinksHere/Example page|hideredirs=1}}</nowiki></code>. There are three params you can use (in any order, or combination) for hiding redirects, transclusions, or normal links: *<code><nowiki>{{Special:WhatLinksHere/Example page|hideredirs=1}}</nowiki></code> *<code><nowiki>{{Special:WhatLinksHere/Example page|hidetrans=1}}</nowiki></code> *<code><nowiki>{{Special:WhatLinksHere/Example page|hidelinks=1}}</nowiki></code> === 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 a [[Help:Searching|search]] using the [[Help:Searching#insource:|insource]] parameter, e.g. use <code><nowiki>insource:/\[\[[Ff]oo/</nowiki></code> to search for articles that contain links to [[Foo]] (either direct links, <code><nowiki>[[Foo]]</nowiki></code> and <code><nowiki>[[foo]]</nowiki></code>, or [[Help:Piped link|piped links]], <code><nowiki>[[Foo|label]]</nowiki></code> and <code><nowiki>[[foo|label]]</nowiki></code>). A user script, [[User:PrimeHunter/Source links.js]], simplifies this process by providing a link to automatically perform the search.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)