wiki.techinc.nl/includes/page
Bartosz Dziewoński f7158c396d Add markup to page titles to distinguish the namespace and the main text
Pages outside of the main namespace now have the following markup in
their <h1> page titles, using 'Talk:Hello' as an example:

<h1>
  <span class="mw-page-title-namespace">Talk</span>
  <span class="mw-page-title-separator">:</span>
  <span class="mw-page-title-main">Hello</span>
</h1>
(line breaks and spaces added for readability)

Pages in the main namespace only have the last part, e.g. for 'Hello':

<h1>
  <span class="mw-page-title-main">Hello</span>
</h1>

The change is motivated by a desire to style the titles differently on
talk pages in the DiscussionTools extension (T313636), but it could
also be used for other things:
* Language-specific tweaks (e.g. adding typographically-correct spaces
  around the colon separator: T249149, or replacing it with a
  different character: T36295)
* Site-specific tweaks (e.g. de-emphasize or emphasize specific
  namespaces like 'Draft': T62973 / T236215)

The markup is also added to automatically language-converted titles.

It is not added when the title is overridden using the wikitext
`{{DISPLAYTITLE:…}}` or `-{T|…}-` forms. I think this is a small
limitation, as those forms mostly used in the main namespace, where
the extra markup isn't very helpful anyway. This may be improved in
the future. As a workaround, users could also just add the same HTML
markup to their wikitext (as those forms accept it).

It is not also added when the title is overridden by an extension
like Translate. Maybe we'll have a better API before anyone wants
to do that. If not, one could un-mark Parser::formatPageTitle()
as @internal, and use that method to add the markup themselves.

Bug: T306440
Change-Id: I62b17ef22de3606d736e6c261e542a34b58b5a05
2022-08-16 23:36:21 +00:00
..
Hook WikiPageFactory: Improve phan suppressions 2022-04-12 07:00:14 +01:00
Article.php Add markup to page titles to distinguish the namespace and the main text 2022-08-16 23:36:21 +00:00
CategoryPage.php Merge "page: Replace deprecated User::getOption" 2022-08-05 01:11:27 +00:00
ContentModelChangeFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
DeletePage.php ResourceLoader namespace (attempt 2) 2022-05-24 15:41:46 +00:00
DeletePageFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
ExistingPageRecord.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
ImageHistoryList.php Use MainConfigNames instead of string literals 2022-04-11 17:53:27 +03:00
ImageHistoryPseudoPager.php Call IContextSource::getAuthority instead of IContextSource::getUser 2022-06-29 22:22:44 +02:00
ImagePage.php page: Use ContextSource for Config and messages 2022-08-06 22:18:01 +00:00
LegacyArticleIdAccess.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
MergeHistoryFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
MovePageFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
Page.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
PageArchive.php Use UndeletePage from Special:Undelete 2021-11-24 19:25:06 +01:00
PageAssertionException.php Include name of page identity on failure within WikiPageFactory 2021-11-05 20:55:19 +01:00
PageCommandFactory.php Merge "UndeletePage: Improve reason when restoring assoc talk page" 2022-04-15 19:07:05 +00:00
PageIdentity.php
PageIdentityValue.php Add convenience constructors for PageReference/Identity 2021-06-07 07:31:24 -07:00
PageLookup.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
PageRecord.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
PageReference.php PageIdentityValue: apply basic validation of titles 2021-05-07 17:17:45 +02:00
PageReferenceValue.php Add convenience constructors for PageReference/Identity 2021-06-07 07:31:24 -07:00
PageSelectQueryBuilder.php Pass array to Assert::parameterType when asserting multiple types 2022-06-18 09:34:36 +02:00
PageStore.php Use MainConfigNames instead of string literals, #3 2022-04-26 14:31:26 +03:00
PageStoreFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
PageStoreRecord.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
ParserOutputAccess.php poolcounter: Avoid calling parent::doWork in PoolWorkArticleView classes 2022-05-13 20:36:25 +00:00
ProperPageIdentity.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
RedirectLookup.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
RedirectStore.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
RollbackPage.php Merge "Remove index detection 'rev_page_timestamp'" 2022-07-03 17:27:35 +00:00
RollbackPageFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
UndeletePage.php Fix many typos in comments 2022-05-10 12:46:11 +00:00
UndeletePageFactory.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
WikiCategoryPage.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
WikiFilePage.php page: Improve class documentation briefs 2022-04-12 00:49:41 +00:00
WikiPage.php Improve docs of various ::getQueryInfo functions 2022-08-13 21:18:44 +02:00
WikiPageFactory.php WikiPageFactory: Improve phan suppressions 2022-04-12 07:00:14 +01:00