I'm using MediaWiki. Some of the pages in the wiki contain one or more large navigation block, like the ones on the bottom of this page:
Blocks like these are included in many pages. Now, when a page is saved, the list of links to other pages is updated as well (pagelinks
table). Those references are used by the 'What links here' special page and probably other similar pages as well.
But I actually don't want the links in these blocks to count for that. Is there a way I can influence MediaWiki to exclude some parts of a page in this updating-links-to-other-pages process?
I've written some extensions, overriden specific classes and used some hooks, so I know the basics of how that stuff works, but I cannot find the right hook to influence this part of the process.
As far as any attempts go, I've found ParserOutput::addLink
, which is used to store parsed links into an array. Then, on save, this array is merged into the database. addLink is called from a couple of places, most notably from Parser::replaceInternalLinks2
, which is called from Parser::internalParse
.
If I understand correctly, internalParse
is called for each piece of text separately. That includes separate includes, but also nested tags. Maybe I could use the hooks called in internalParse
, but I haven't found the holy grail yet. I could use a push in the right direction to solve it, preferably without modifying the Parser class itself.