Hi,

Is it possible to change the crumbs display when a user views another user's profile to show:
You are here> Bob Jones Profile ?

At the moment it shows You are here>User account.

Thanks

Comments

donquixote’s picture

Have a look at the Admin > Structure > Crumbs > Entity parent > User.

You can specify what should be the parent path for user/% pages. And you can use tokens.

What exactly do you want to see in the breadcrumb?

dzinergal’s picture

Thanks for replying, I'd like to see the users name displayed as the link e.g. Bob Jone's Profile as the crumb for his user account page.

donquixote’s picture

Ok, here is how the system works:

  1. Crumbs builds the trail of paths, that could be something like <front> » user » user/123 (it cuts off the last part of the url to find the parent).
    You can influence this with the "Entity parent" settings as mentioned in #1.
    I would say the user breadcrumb item as the default parent is actually pretty useless, so I recommend to set e.g. <front> as the parent for "authenticated user". Or if you have a page with a list of users, use that.
  2. Crumbs tries to find a title for each path. E.g.
    <front>: "Home"
    user: "User account" or "My account"
    user/123: "Bob Jones"
  3. Depending on the display settings (Admin » Crumbs » Display, "Current page settings") the "Bob Jones" might not be displayed at all, because it is the current page.
    Also depending on display settings ("Home link settings"), the home page link might be hidden.
    So the resulting breadcrumb could be "Home » User account » Bob Jones" or it could be "Home » User account » " or it could be "User account » Bob Jones" or just "User account » ", depending on your settings.

So, the how does it find a title for user/123?

  1. It checks if there are any title plugins for user/%
  2. If not, then it uses the "title" and "title callback" registered with hook_menu() for this path. In this case, this is user_menu(), and the callback is user_page_title().

And here is what you can do.

  1. In admin/structure/crumbs/display, in "Current page settings", "Show the current page at the end of the breadcrumb trail", set this to "Show, as link" or "Show, as plain text". (to make the current page link show up)
  2. In "Breadcrumb visibility settings", "Shortest visible breadcrumb", set this to "(Home)" or "(Home » Current page)". (to avoid that the breadcrumb will be hidden if it is only two items long)
  3. In "Home link settings", check the checkbox "Show the home page link", if you want the "Home" to be part of the breadcrumb.
  4. In admin/structure/crumbs/entity-parent/user, set "authenticated user" parent = <front>, so that the user path is no longer part of the breadcrumb.

The resulting breadcrumb on the user/123 page will be "Home » Bob Jones".

If instead you want "Home » Bob Jones' profile", you need one step more - we can discuss that in a following post.

donquixote’s picture

Status: Active » Fixed

Closing this as "fixed" to clean the queue.
This has been sufficiently explained, and no further questions are popping up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.