[Mediawiki-l] Making category links with articles, but no text, active
Vernon Thommeret
synotic at gmail.com
Sat Feb 3 16:31:31 UTC 2007
>
> On 01/02/07, Vernon Thommeret <synotic at gmail.com> wrote:
>> In short, how might I make it so that links to categories are active
>> if there are any links in the categories, regardless of whether there
>> is content in the pages?
>
> I'm guessing you mean you want them rendered as a blue link all the
> time. Probably the best way to do this is to hack includes/Linker.php
> - find the method Linker::isAlwaysKnown() and add NS_CATEGORY to the
> namespace conditions for it to return true.
>
> This will cause MediaWiki to treat all links to category pages as
> being known to exist. In the case where the category doesn't exist,
> this will merely lead to a blank category page listing the category
> members. For existing categories, it will continue to work as normal,
> of course.
>
>
> Rob Church
Thanks for your help; I was able to do it. However, I was wondering
if this could be extended so that, to be an active link, it has to
have: either text in the category or category members in the
category, or both.
In other words, if a category has no text, and no category members,
it wouldn't be a blue link.
Is this possible?
Thanks again.
More information about the MediaWiki-l
mailing list