Output title of current local task in HEAD title (e.g., "People » List")

Created on 20 January 2007, almost 18 years ago
Updated 22 June 2023, over 1 year ago

In Drupal, local tasks are shown as part of their parent: the main page title is still the one of the parent (e.g. "Administer"), while the selected tab is only present in the page, under the <h1> tag.

This can be confusing, for example when you have multiple local tasks open in separate browser windows/tabs. They will all have the same title and will be impossible to tell apart that way.

In the page, the local tasks are shown as part of the page heading, and the title in the <HEAD> <TITLE> tags should reflect that. For example, if you go to /admin/by-module, the head title should be "Administer › By Module" (Garland themes in the funky arrow). At /admin/user and /admin/user/user, it should be "Users › List". /admin/user/add would be "Users › Add". So, even default local tasks would show their title in the head.

The attached patch implements this cleanly. The head breadcrumb is themed the same as the one in the page, but without HTML tags.

The only exception is when drupal_set_title() is used to override the page title. This happens e.g. on user/123. The menu item is defined for 'user' and has a generic 'user' title. When it is viewed, the title is changed to the account name. In this case, we cannot generate a breadcrumb for the local tasks, as it would simply say "User › View" and "User › Edit".

Feature request
Status

Closed: outdated

Version

9.5

Component
Menu system 

Last updated 1 day ago

Created by

🇧🇪Belgium Steven

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Since there hasn't been movement in 12 years think it's safe to say this can be closed.

    If still a valid request please reopen updating issue summary for how it pertains to D10.

Production build 0.71.5 2024