[WikiEN-l] Lists and redlinks and link maintenance

Andrew Gray andrew.gray at dunelm.org.uk
Wed Aug 5 00:30:05 UTC 2009


2009/8/4 Carcharoth <carcharothwp at googlemail.com>:

> In other words, I like using "what links here" to find out when
> something is mentioned in the article *text*, rather than when it is
> merely mentioned in a navbox template. One of the problems though is
> that links from an *infobox* are more relevant, so I would want those
> to be in "what links here", so cutting out templates altogether is not
> good. But being able to *filter out* the "links from transcluded
> templates" (and also list which templates they are coming from) would
> be the ideal solution.

Here's a little late-night hack. It's a bit roundabout, and it
involves making half a dozen pointless edits, but it does at least
solve the problem!

Most articles have a redirect or two going to them; if they don't, you
can always create some pretty easily. Go to whatlinkshere, and check
that one of those redirects is orphaned - ie, there's no inbound links
to it. Then, generate a list of all the templates linking to the
article. Open each one, and change the link in the template to go to
the redirect, rather than straight to the main article.

Now, look at whatlinkshere. All the template links should be indented,
hanging off that redirect; all the direct links, hopefully from
article text, will be separated out. This also means you can spot the
cases where an article has a link in a template *and* a link in the
body text; it'll appear twice, since one goes to the redirect and one
doesn't.

When you're done, fix all the links back again; all nice and tidy.
It'll have taken a few extra minutes, and a few extra edits, but it's
better than nothing!

(This doesn't affect the case of "succession boxes" in articles, but
as those usually only list the previous or subsequent holder of a
post, rather than the navigation template of all its members, they're
probably directly relevant to the article in 95% of cases!)

-- 
- Andrew Gray
  andrew.gray at dunelm.org.uk



More information about the WikiEN-l mailing list