Needs review
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
page displays
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2012 at 16:28 UTC
Updated:
7 Jan 2019 at 02:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anrikun commentedThe attached patch addresses this issue.
Comment #2
merlinofchaos commentedWhy? I don't agree with the assertion here.
Comment #3
anrikun commentedBecause if my case I build some custom breadcrumb using
menu_get_item()with path to the views page as argument. But it returns a item with an empty title if page has no menu link attached, leading to an empty link being displayed inside breadcrumb.IMHO this is not normal (in a Drupal way): any menu router item leading to a real page has always the title of the page as title in Drupal.
Even if you don't think this is a bug, please consider this as a feature request. Adding this won't hurt. This is really a simple patch :-)
Comment #4
merlinofchaos commentedBut what if the title includes tokens for argument placeholders? It will still be incorrect. This is not going to be correct behavior.
Comment #5
anrikun commentedI'm talking about using the default title of the view.
The one which description states:
The aim is to assign a default title to the menu router item of the page instead of leaving it empty.
Comment #6
merlinofchaos commentedI'm just saying, if you've got a with path foo/% and there's a title set for the %, it'll still be wrong. Your solution will probably work fine without arguments, but once arguments are in place you'll get the wrong title in your breadcrumb.
Comment #7
anrikun commentedArguments don't matter here.
The title property of a menu router item is just the default static title assigned to a page. It's a simple string that may be then overridden by a custom title callback for instance.
I think that the title of a display in Views is exactly the same: it's a default title, again a simple static string, that may then be overridden by arguments settings.
As I wrote before, this issue is just about making the title property of the menu rooter item of a page display match the title property of the page display.
It is a very small addition.
Comment #8
tim.plunkettI disagree with the premise of this patch as well.
Furthermore, this would drastically change the behavior of Views for all existing sites.
Comment #9
anrikun commented@tim.plunkett: sorry for reopening this but I need more explanations.
Have you reviewed the patch and read my explanations at #7? It is just about giving a title to a menu router item instead of leaving it empty. If you think that this could break something, Could you at least give a concrete example?
Turning this into a feature request in the meantime.
Comment #10
dawehnerI agree that it is unlikely that you have configured the view item as that BUT
if you did that maybe you have done this out of purpose.
If there is one thing i learned through the times is that people (mis)use drupal by 110% percent.
Are you sure it makes sense to set a title to menu-type none.
I'm wondering for example whether the breadcrumbs should ignore it then or people should change there views configuration.
There might be an issue which allows to setup a MENU_CALLBACK or even MENU_VISIBLE_IN_BREADCRUMB.
Comment #11
uncommented commentedI know this thread has been dead for a while, but out of frustration regarding disappearing breadcrumbs, I've developed a patch to solve the issue.
I've developed a patch to add support for a new menu setting, "Visible in breadcrumb", for pages. When chosen, this setting causes the page's listing in menu_router to include a callback to views_get_title, which I have bolted onto views.module right below views_page. This approach has the advantage of not breaking token replacement in titles.
Comment #12
chris matthews commentedThe 6 year old patch in #11 to views_plugin_display_page.inc and views.module applied cleanly to the latest views 7.x-3.x-dev and if still applicable needs review.