--
MichaelDaum - 28 Jul 2006
Cool, yet another Plugin by Micha
Tausendsassa
. Thanks for sharing!
--
PeterThoeny - 28 Jul 2006
I have installed the latest version of the
BreadCrumbsPlugin (v0.03) using TWiki 4.0.4 and the latest
NatSkin (2006-07-31). I don't see the parent topics in the breadcrumb line, only the web and the actual topic name. When I turn on the
PatternSkin, I see all parents in the breadcrumb line of the skin while they are still missing in the line generated by the
BreadCrumbsPlugin
Any ideas what I can do to make this work as expected?
--
TorstenUeckert - 06 Aug 2006
Thanks for reporting! Fixed in v0.04.
--
MichaelDaum - 07 Aug 2006
The
BreadCrumbsPlugin topic displayed r1, but the .txt,v file has 5 revisions. I did a save without change, which fixed the topic to r6. This is another example of
BuildContrib issue, tracked in
Bugs:Item2683
.
--
PeterThoeny - 08 Aug 2006
The
BreadCrumbsPlugin appears to assume the name of the home topic. The following patch should correct this by querying the %HOMETOPIC% variable in the current web. (This diff is against $VERSION = '$Rev: 12307$'; $RELEASE = 'v0.10';)
*** BreadCrumbsPlugin.pm.orig Wed Dec 27 23:03:28 2006
--- BreadCrumbsPlugin.pm Wed Dec 27 23:03:10 2006
***************
*** 92,97 ****
--- 92,98 ----
sub getLocationBreadCrumbs {
my ($thisWeb, $thisTopic, $recurse) = @_;
+ my $webhome = TWiki::Func::expandCommonVariables("%HOMETOPIC%", $thisTopic, $thisWeb);
my @breadCrumbs = ();
# collect all parent webs as breadcrumbs
***************
*** 100,115 ****
if ($webName =~ /^(.*)[\.\/](.*?)$/) {
$webName = $2;
}
! #writeDebug("adding breadcrumb: target=$thisWeb/WebHome, name=$webName");
! push @breadCrumbs, { target=>"$thisWeb/WebHome", name=>$webName };
} else {
my $parentWeb = '';
my @webCrumbs;
foreach my $parentName (split(/\//,$thisWeb)) {
$parentWeb .= '/' if $parentWeb;
$parentWeb .= $parentName;
! #writeDebug("adding breadcrumb: target=$parentWeb/WebHome, name=$parentName");
! push @webCrumbs, { target=>"$parentWeb/WebHome", name=>$parentName };
}
if ($recurse->{once} || $recurse->{webonce}) {
my @list;
--- 101,116 ----
if ($webName =~ /^(.*)[\.\/](.*?)$/) {
$webName = $2;
}
! #writeDebug("adding breadcrumb: target=$thisWeb/$webhome, name=$webName");
! push @breadCrumbs, { target=>"$thisWeb/$webhome", name=>$webName };
} else {
my $parentWeb = '';
my @webCrumbs;
foreach my $parentName (split(/\//,$thisWeb)) {
$parentWeb .= '/' if $parentWeb;
$parentWeb .= $parentName;
! #writeDebug("adding breadcrumb: target=$parentWeb/$webhome, name=$parentName");
! push @webCrumbs, { target=>"$parentWeb/$webhome", name=>$parentName };
}
if ($recurse->{once} || $recurse->{webonce}) {
my @list;
***************
*** 140,146 ****
# check end of loop
last if
$seen{"$web.$topic"} ||
! $topic eq 'WebHome' ||
!TWiki::Func::topicExists($web,$topic);
# add breadcrumb
--- 141,147 ----
# check end of loop
last if
$seen{"$web.$topic"} ||
! $topic eq $webhome ||
!TWiki::Func::topicExists($web,$topic);
# add breadcrumb
--
TomMetro - 28 Dec 2006
I'm also having problem with this plugin and the
WebHome or home topic. See
Bugs:Item4417
for details. It looks like
WebHome is excluded from the path no matter what.
--
StephaneLenclud - 31 Jul 2007
If you want to use this plugin with
SpacedWikiWordPlugin so your breadcrumbs are spaced, add the following code to
BreadCrumbsPlugin.pm in renderBreadCrumbs just before the line 'push
@lines
, $line;'
$line =~ s/\[\[.*\]\[(.*)\]\]/$1/g;
my $spacedtopic = TWiki::Plugins::SpacedWikiWordPlugin::renderWikiWordHandler($line);
$line = "[[$web.$line][$spacedtopic]]";
--
TomBriden - 22 Nov 2007
Micha, if it is OK with you I may start workingon this plugin to:
I think I will start working on it after Mar 15th. Suggestions welcome.
--
ColasNahaboo - 05 Mar 2008
Hi Colas. Any contributions very welcome! But send me a patch first / attach it here.
Reading
ExplodeHierarchalWebsInBreadcrumbs ... well
BreadCrumbsPlugin already does that. Infact, thats the reason I wrote it. Do you have a different style of breadcrumbs in mind?
About the ellipsis: do you mean to shrink the middle of a very long breadcrumbs to an ellipsis? Cool idea. How do we call the parameter?
Another missing feature: suppress items in the breadcrumbs trail with the same target. For example on
Web.SubWeb.WebHome you will get
[[Web.WebHome][Web]] » [[SubWeb.WebHome][SubWeb]] » [[WebHome]]
that is the last two items have got the same target. These doublets should be avoided.
--
MichaelDaum - 05 Mar 2008
Michael, please consider opening up a bit by allowing people to submit changes directly. The core code is open to all who have check-in rights, the same can apply to extensions.
My goal is to nurture a friendly environment that is open to contributors who offer to help, especially to new coders (alas we know, Colas is not new).
Having said that, I think
ExplodeHierarchalWebsInBreadcrumbs should be part of the core code.
--
PeterThoeny - 05 Mar 2008
Peter, do you think
ContactAuthorFirst is bad? See my remarks at
ChangeContactAuthorFirstPolicyNotifyAuthor.
I'd like to communicate with people before they checkin.
--
MichaelDaum - 05 Mar 2008
Peter, I totally understand Michael position (that's why I was asking permission first :-). This is how most open source projects work anyways.
- On ellipsis, confluence way seemed OK (a number of max webs to show, starting from leaf). Ellipsis is the feature we need, BTW.
- On the suppress item, I was thinking to just port the logic of ShorterUrlSupport: not show either the HomeWeb web or the WebHome topic
- and maybe also a setting to be able to say if you want the separator acting as a directory indicator: show
subweb / instead of subweb for subweb / webhome (optionally disablable for the root topic, where you may not want the lone / there)
On the core/plugin... oops shame on me I only tought of the plugin, forgot the core functionality.
--
ColasNahaboo - 05 Mar 2008
ContactAuthorFirst is good since it shows a commited developer. IMO it should not exclude others from checking in directly. To me the "contact author first" means to get an agreement on teh spec with the author, then do the work.
On ellipsis, I do not think it is needed in the core. For KISS I'd treat the webs the same as topic hierarchy. In fact, the topic hierarchy tends to bigger anyway than the web hierarchy,and the breadcrumb wraps around nicely if it is big. E.g. that feature is useful in this plugin for those who need it.
--
PeterThoeny - 06 Mar 2008
Peter, your recent additions to
ContactAuthorFirst explain better what we all mean by that.
Well, let me explain my view on open source collaboration again: a direct checkin to a ContactAuthorFirst plugin - meaning without having talked to each other before - is a "communication problem". In that sense ContactAuthorFirst does
fosters collaboration more than a
PleaseFeelFreeToModify ModificationPolicy, where we are in danger of losing quality. Not sure if we disagree actually as this is the implicit policy of the core release process as well. And there's no PleaseFeelFreeToModify for TWiki's core code.
Colas, on suppressing items: I am not sure if cutting HomeWeb will make a good breadcrumbs trail
in the HomeWeb. People use the last web on the path to jump back to WebHome. On HomeWeb.WebHome, you'd end up with no breadcrumbs path at all. On all other topics in the HomeWeb you'd have only the current topic in it with no way to click on HomeWeb to jump to WebHome.
The HomeWeb isn't part of the breadcrumbs trail in other webs anyway.
On ellipsis, I like the idea, as long as I can switch it on and off and give it different thresholds. By the way, where would you insert the ellipsis: at the head of the path or somewhere in the middle?
Distinguishing separators for the web and the topic parent part is a no-brainer, I guess, though I am not sure if breadcrumbs will look ok or be too "irregular". Worth experimenting.
--
MichaelDaum - 06 Mar 2008
Actually, the HomeWeb is a duplicate of the sitename that is at the start of the breadcrumbs (TWiki here for instance) so it is nice to remove the homeweb. If you want to look at it with a breadcrumb reflecting the URLs, look at my toy site:
On ellipsis: for confluence it is after the first web.
--
ColasNahaboo - 06 Mar 2008
Ah, okay. Have a try at completely replacing the standard TWiki breadcrumbs with
%BREADCRUMBS%. See
these examples
.
Note, that the
site itself is actually not part of the breadcrumbs here. It only consists of the hierarchical webs and parent topics trail...
Right, it would be double and tripple repetition to have all these links point to HomeWeb.WebHome.
--
MichaelDaum - 06 Mar 2008
Okay here's what the next version will do:
- a
BREADCRUMBSPLUGIN_RECORDTRAIL flag to switch off recording the click trail (defaults to on). It has been recorded no matter if we ever used path breadcrumbs or not.
-
maxlength: the maximal length of a breadcrumbs trail, defaults to 0 which means infinit. any exceeding breadcrumbs item will be cut off.
-
ellipsis the format string to be prepended to the result when the max breadcrumbs length was exceeded.
- the displayed name of a breadcrumbs name will now be the "topic title"
-
spaceout flag to switch on spacing out wiki words, defaults to off.
-
spaceoutsep string to be put into spaced out wiki words
The "topic title" is either the value of the
TOPICTITLE preference variable, the
TopicTitle formfield of an attached TWikiForm or the physical topic name itself as a fallback. This matches the definition in the
DBCachePlugin. If the latter is installed, then it will be used to fetch the topic title from its cache.
If not, then core means are used.
That's gonna be BreadCrumbsPlugin-2.0.
--
MichaelDaum - 22 Mar 2008
2.o is out
--
MichaelDaum - 28 Apr 2008
If
DBCachePlugin is installed
BreadCrumbsPlugin shows in the plug-ins list as:
%TOPIC% - %SHORTDESCRIPTION% (v2.00, $Rev: 16739 (28 Apr 2008) $): A flexible way to display breadcrumbs navigation
Without
DBCachePlugin it was showing as:
BreadCrumbsPlugin (v2.00, $Rev: 16739 (28 Apr 2008) $): A flexible way to display breadcrumbs navigation
--
StephaneLenclud - 31 Aug 2008
Woops, that's due to the new TOPICTITLE feature in
DBCachePlugin. Some of these plugins define TOPICTITLE using variables, like TOPIC - SHORTDESCRIPTION, which aren't resolved later on.
--
MichaelDaum - 01 Sep 2008
Bugs:Item5972
fixed.
--
OliverKrueger - 01 Sep 2008
I changed the
ModificationPolicy of this extension from
ContactAuthorFirst to
PleaseFeelFreeToModify due to inactivity. Anyone please feel free to work on this extension.
--
PeterThoeny - 2012-12-03