Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Oct 2012 at 11:20 UTC
Updated:
21 Sep 2014 at 18:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunRelated:
#1013730: Drop page title derived from active trail (breadcrumb) behavior
#111081: Output title of current local task in HEAD title (e.g., "People » List")
#996302: Pages of local actions don't display local action title as page title
#1041906: Taxonomy term menu link title overrides term page title
However, re-reading the OP once more (vastly different than the issue title), the special "Home" page title behavior is completely independent from all of these issues and applied in menu_set_active_trail().
FWIW, the functions of interest are:
http://api.drupal.org/api/drupal/core!includes!menu.inc/function/menu_se...
http://api.drupal.org/api/drupal/core!includes!menu.inc/function/menu_ge...
http://api.drupal.org/api/drupal/core!includes!menu.inc/function/menu_ge...
However, the problem space is that the front page does not have a menu link.
The menu system takes over the title of the last menu link in the active trail (~breadcrumb) as the page title.
But the front page is only configured to point to a certain router path in the system. There is no menu link in the active trail for it.
Also, we do still want the active trail (~breadcrumb) to contain "Home" when you are not on the front page.
So what you'd have to do would be along the lines of attached patch. Untested.
Comment #2
tstoecklerLooks great!
I think this needs tests, though. Would be great to utilize the new test_page_test.module.
Comment #3
webchickSuggestion: take the change over at #1811804-18: Provide a test page testing module and do it here, and wrap an assert around it.
Comment #4
sunWe can do this for now.
But I want to point out that there's actually some hope that the page title won't be derived from the router/links at all anymore. I doubt that there's a concrete plan already for how special, pluggable, built-in pages like the front page are going to be handled in the new router and controller and blocks and layouts world, but at least for all other routes, the controller will likely be responsible for setting (or returning) an appropriate page title; if it doesn't, then there will be no title.
Comment #5
damien tournoud commentedLet's not confuse two things:
Homelink in the breadcrumbThe latter is set from the former on the homepage if there is no explicitly set title.
The current patch introduces a weird situation in which the breadcrumb link for
Homemight have a different label depending on the situation. That's just not acceptable.If we want to go that route, we should explicitly load the preferred menu link for the homepage and use its title for the first breadcrumb entry.
Comment #8
dawehnerThe d8 default page title is "Welcome to site-install" which is coming from the content itself. Let's move this to d7.