Page title behavior
С ответомCurrently, page title headings on Fandom wikis are altered from the basic MediaWiki standard in several ways.
- Several namespaces (File, MediaWiki, etc.) have the namespace prefix removed.
- Talk namespace prefixes are all simplified to "Talk:", and a space is inserted after the colon.
- The structure of titles when performing some actions is changed. For example, when viewing a page's history via ?action=history, the title uses the system message "page-header-title-prefix-history" with the page title passed as the first parameter, whereas with vanilla MediaWiki, it uses the system message "history-title". Ditto for viewing a diff.
These days, however, the default page titles generated by MediaWiki include the useful feature of wrapping the namespace, the colon separator, and the page name in three separate HTML span tags, with standard classes. Thus, a hypothetical page "Template:Example" has the following HTML within its heading (that is, it would if it weren't for Fandom's modifications):
<span class="mw-page-title-namespace">Template</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Example</span>
So, you could achieve the first, and part of the second, modifications I listed above, without your current technique. Just add some simple CSS to Fandom's skin files.
Specifically, you could hide the namespace prefix selectively by namespace with the following:
:is(.ns-6, .ns-8, .ns-10, .ns-14) :is(.mw-page-title-namespace, .mw-page-title-separator){
display: none;
}
The above example would hide the namespace prefix on the File, MediaWiki, Template, and Category namespaces (namespaces 6, 8, 10, and 14, respectively).
You could also insert a space after the colon in the namespace prefix -- either just on talk namespaces like you do now, or on all namespaces -- with just CSS.
For all namespaces:
.mw-page-title-separator::after{
content: ' ';
}
Just for talk namespaces (although I can't think of a good reason why this is wanted in some cases and not others):
.ns-talk .mw-page-title-separator::after{
content: ' ';
}
As far as the third point I listed above (changing the title text on history and diff pages), I believe it's possible to override the default text of a system message, so you could just do that instead of actually changing the system message those cases draw upon.
With reverting your current approach and implementing the CSS I suggest above (plus overriding the system messages), you would still achieve *all* of what you currently do, except for simplifying the namespace prefix on talk pages to just "Talk", which I would argue is no great loss, since that modification makes it harder to understand what namespace the page is in.
Thank you for reading and considering this feedback.
-
Официальный комментарий
Thank you for your detailed feedback. I really appreciate this kind of effort and willingness to collaborate with us.
I’m sharing your suggestion to the related Product team, to know their first thoughts about it and also to know more details about why we’re using our custom version of the original MediaWiki software for it.
I’m replying to you in this post as soon as I have a reply from them.
Войдите в службу, чтобы оставить комментарий.
Комментарии
1 комментарий