Would it be difficult to arrange matters so that the Whatlinkshere page showed indirect links through a transcluded template in similar fashion to those through a REDIRECT page?
The next question would be whether it might be possible to add a twist-down button like on "enhanced recent changes" so that these "sub-trees" could be hidden, which is obviously doable, but since the equivalent suggestion for TOCs has been sitting in the queue for lo-so-many-yonks I wouldn't want to be holding my breath for it.
On 19/05/05, Phil Boswell phil.boswell@gmail.com wrote:
Would it be difficult to arrange matters so that the Whatlinkshere page showed indirect links through a transcluded template in similar fashion to those through a REDIRECT page?
Yes, to put it simply, it would be very difficult. AFAIK, the contents of a template are added to the containing page *before* things like links are calculated, so that there's no way of knowing whether a link was entered directly, or through a template. e.g. if [[Template:B]] contains "[[C]]", a page containing "{{B}}" will have exactly the same links recorded in the database as one containing "{{B}} [[C]]"; thus the whatlinkshere display for [[C]] would have no way of knowing which was the case.
This is hard to avoid, unless the template system is altered to "parse" the fragment of wikitext in the template and insert it ready-made - a move likely to be controversial with those using templates, for instance, as fragments of a table.
There are currently also issues to do with the way template links are represented and handled in the database (see http://bugzilla.wikimedia.org/1065 and the bugs it blocks), which among other things mean that editting a template doesn't update the "inherited" links (bug 939). A way of determining and representing the "inherited" status of those links would be an alternative solution to that one, I guess, but I'm not sure how it would work.
mediawiki-l@lists.wikimedia.org