Page MenuHomePhabricator

Page hierarchy: Native support for navigation bar(links)
Closed, ResolvedPublicFeature


Feature summary (what you would like to be able to do and where):

  • Make OutputPage stores the data of the navigation bar.
  • Create OutputPage::addNavigationBar(…) function to store the data.
  • Make SpecialPage::outputHeader() renders the navigation bar using the data.
  • Make Skin::getTemplateData() provides the data of the navigation bar. And implement features and flags for making sure the navigation bar is not duplicated.
  • (Maybe another task) Provide a parser function that allows editors on the wiki to add a navigation bar to a general wiki article.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Some special pages provide the navigation bar(links) on the top of the page, under the title.

image.png (86×739 px, 13 KB)
image.png (85×498 px, 11 KB)
image.png (132×521 px, 15 KB)

Those pages create links and append those to the subtitle of the page. I don't know why the 'subtitle' was named, but if it just means the position, I think it is worth splitting some function of it based on the role.

Benefits (why should this be implemented?):

  • Code duplications would be reduced and the same user experience over multiple special pages would be provided.
  • The core and extension developers could use SpecialPage::addNavigationBar(…) instead of creating from scratch.
  • The skin developers could acquire more flexibility over navigation bar render.
  • (Maybe another task) The template editors could provide the same navigation page experience for Template:Sidebar.

Event Timeline

Jdlrobson subscribed.

It seems that special pages would benefit from a sense of hierarchy.

Some special pages seem to be subpages of articles e.g. Special:WhatLinksHere/A is a subpage of A

Some special pages have subpages like the ones you bring up here.

Some pages are siblings e.g. article and talk page.

And articles can have children by including "/" in the title

Special pages often provide their own code to generate UI elements and agree we should move away from this.

Not 100% sure OutputPage is the place to do this

We've been thinking about this as part of Desktop Improvements (Vector 2022) (we plan to tackle the tabs in the next phase of the project). I suspect we will be looking to revisit how all this works as part. I'll look to reach out when that work begins to make sure we are solving the problem in a way that makes sense to you.

Jdlrobson renamed this task from Native support for navigation bar(links) in OutputPage to Page hierarchy: Native support for navigation bar(links).Dec 23 2021, 7:08 PM

Hi @Lens0021 in T313349 we made it possible for special pages to register menus. This is currently live in Vector 2022 skin but we plan to add it to other skins in due course. It repurposes the existing "namespaces" tabs.

For special pages you can add to the menus using SpecialPage::getShortDescription and SpecialPage::getAssociatedNavigationLinks()
For any other page, you can modify the p-associated-pages key using


Can we resolve this, or is there more that needs to be done to meet your needs?

I think we can. Thank you for your and the team's effort.

Jdlrobson claimed this task.