[Mediawiki-l] Detecting presence of an anchor?

Jean-Lou Dupont jeanlou.dupont at gmail.com
Wed Aug 1 15:59:46 UTC 2007


Daniel Barrett wrote:
> When you link to an article that doesn't exist, the link appears in red.
> Is there a similar way to display whether a page anchor exists?  For
> example, if you link to [[mypage#myanchor]], can it be colored
> differently if "myanchor" does not exist on page "mypage"?
>
> DanB
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>   
To the best of my knowledge, this would require an extension that sifts 
through the html output
of the parser and makes the appropriate changes such as adding 
'class="new"' to the relevant
anchors.

The extension would need to hook-up to 'parser after tidy' (assuming one 
cares about parser caching).

jld.




More information about the MediaWiki-l mailing list