Exclude some parts of the page from pagelinks in MediaWiki -


i'm using mediawiki. of pages in wiki contain 1 or more large navigation block, ones on bottom of page:

https://www.eftepedia.nl/

blocks these included in many pages. now, when page saved, list of links other pages updated (pagelinks table). references used 'what links here' special page , other similar pages well.

but don't want links in these blocks count that. there way can influence mediawiki exclude parts of page in updating-links-to-other-pages process?

i've written extensions, overriden specific classes , used hooks, know basics of how stuff works, cannot find right hook influence part of process.

as far attempts go, i've found parseroutput::addlink, used store parsed links array. then, on save, array merged database. addlink called couple of places, notably parser::replaceinternallinks2, called parser::internalparse.

if understand correctly, internalparse called each piece of text separately. includes separate includes, nested tags. maybe use hooks called in internalparse, haven't found holy grail yet. use push in right direction solve it, preferably without modifying parser class itself.

the simplest way around not using [[wiki link]] syntax links. can use external link syntax full urls [http://like/this this] , make them regular internal links wrapping them in div or span class="plainlinks". make less painful, make template that:

in template:navilink, have:

<span class="plainlinks">[{{fullurle:{{{1}}}}} {{{2|{{{1}}}}}}]</span> 

(yay mediawiki's insane template syntax) (for exmplanation of fullurle, see https://www.mediawiki.org/wiki/fullurl#url_data)

in navigation template, use e.g.:

* {{navilink|efteling golf course}} * {{navilink|haunted castle (efteling)|haunted castle}} 

instead of navilink template, implement parser function (not hook) outputs html desired link, without putting database. don't see why this, if want to, have @ https://www.mediawiki.org/wiki/manual:parser_functions.

ps: internalparse not called separately included bits of text. template expansion done preprocessor before actual parser run on resulting wikitext.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -