Item4799: Breadcrumbs spanning webs inserts intermediate web names at beginning of crumbs

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: minor
Applies To: Extension
Component: BreadCrumbsPlugin
Branches:
Reported By: TWiki:Main.DiabJerius
Waiting For:
Last Change By: MichaelDaum
Here's the ancestry of a topic:
  1. (none)
  2. Public.Index
  3. Public.Software
  4. Public.SAOTrace
  5. Public.SAOTraceWeb.Install
Here's the BREADCRUMBS invocation:

%BREADCRUMBS{ separator=" » "}%

Here's what is generated:
Public » SAOTraceWeb » Index » Software » SAOTrace » Install
And here's what I expected:
Public » Index » Software » SAOTrace » Install
The code explicitly puts all of the parent webs of the current topic at the front of the breadcrumbs, which assumes that the "oldest" ancestor is in the current web. As shown above, this isn't always the case. I suggest putting the parent webs of the oldest ancestor at the beginning of the crumbs.

-- TWiki:Main/DiabJerius - 11 Oct 2007

Unfortunately, in TWiki pretty any topic can be the parent of another. This allows to have cyclic parent-child relations as well as have it span webs. The location breadcrumbs of the BreadCrumbsPlugin are derived from this parent-child relation. And here's where things fall apart and stop making sense:

Location breadcrumbs shows the where the topic is located, that is which web it is in. If it is located in a subweb, all parent webs are shown as part of the location specification. Then, the parent-topics are used as a further refinement of the topics location. So while the web-subweb is paralleled by a real physical location of a topic (lets assume for a while you are using a files&directory storage backend), the parent-child relation of a topic is more of a logic relationship which just happens to be used to make sense as part of a location breadcrumb most of the time.

Reading thus far, you see now, where things start to clash: appending the partent-child relations to the the web-subwebs structure does not make sense when a parent-child relation spans multiple webs. The breadcrumbs plugin assumes that the WebHome is the root of all parent-child relations within a web. There is no common agreement in TWiki about this assumption. At least I am not sure if a parent-child relation spanning multiple webs makes sense from the wiki point of view. You can argue, that content that is created with a parent-child relations spanning webs may be better combined in one single web as it so related to each other...

-- TWiki:Main.MichaelDaum - 12 Oct 2007

I agree that topic parentage may be confusing, but that seems to be the standard case and I don't see how it can be avoided. Cross-web ancestry can easily occur when moving topics between webs, or when done explicitly as in my case where I use sub-webs as namespaces and create the sub-web hometopic from within the parent web to ensure continuity.

I think the real question is what exactly is the definition of a breadcrumb. There is a difference between what's in the docs for the plugin:

"location" breadcrumbs [...] show you where you are in the site hierarchy, taking into account topic parent relationships

and your statement above:

Location breadcrumbs shows where the topic is located, that is which web it is in.

If a breadcrumb takes into account only topic parent relationships (as in the first definition), then it doesn't matter what web a parent is, and that's how the plugin seems to work, except for the explicit insertion of the current topic's web at the beginning of the breadcrumb.

It's that last insertion which I think breaks the the natural reading of the breadcrumbs as a line of ancestry reading right to left. The expectation is that the leftmost entries are always of higher ancestry. Since no one can control how parent-topic relationships are created, wouldn't it make more sense to anchor the webcrumbs using the web of the left most topic?

In terms of showing just the web of the current topic, it seems to me that the recurse parameter provides a mechanism to do so. If I set recurse=on then I am explicitly indicating that I'm interested in the full parentage. If I set recurse=off then I'm interested only in the current web. In either case the suggestion of using the web of the left-most topic provides the expected result.

Perhaps a compromise solution would be to provide an additional webcrumbs parameter which would specify how the webcrumbs would be inserted:

none
don't insert any at all

topic
insert web of current topic

ancestor
insert web of topmost ancestor.

-- TWiki:Main.DiabJerius - 12 Oct 2007

The notion of location breadcrumbs does not match the under-specified definition of foswiki breadcrumbs that can very well span multiple webs. The BreadCrumbsPlugin tries to immitate location breadcrumbs as good as possible. A breadcrumbs trail that spans multiple webs does not make much sense here.

-- MichaelDaum - 07 Jan 2009

ItemTemplate edit

Summary Breadcrumbs spanning webs inserts intermediate web names at beginning of crumbs
ReportedBy TWiki:Main.DiabJerius
Codebase
SVN Range TWiki-4.3.0, Sat, 06 Oct 2007, build 15172
AppliesTo Extension
Component BreadCrumbsPlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease minor
ReleasedIn
Topic revision: r4 - 07 Jan 2009, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy