--- breadcrumbs.orig 2004-04-05 19:50:19.000000000 -0700 +++ breadcrumbs 2004-04-05 19:50:06.000000000 -0700 @@ -1,6 +1,6 @@ # Blosxom Plugin: breadcrumbs # Author(s): Rael Dornfest -# Version: 2003-03-18 +# Version: 2003-03-18permalink # Documentation: See the bottom of this file or type: perldoc readme package breadcrumbs; @@ -16,6 +16,9 @@ # What divider should I use between path components (e.g. a > path > to...) my $divider = " :: "; +# What flavour (if any) should be appended to the links? +my $flavour = ""; + # -------------------------------- $breadcrumbs; # use as $breadcrumbs::breadcrumbs in flavour templates @@ -33,16 +36,25 @@ $path or return 0; + $flavour = ".$flavour" if $flavour; + my(@p, $p); - $home and push @p, qq{$home}; + $home and push @p, "$home"; foreach ( split /\//, $path ) { $p .= "/$_"; - - push @p, - $p ne "/$path" - ? qq{$_} - : qq{$_}; + + if ($p ne "/$path") + { + # not the current path yet...push a link + push @p, "$_"; + } + else + { + # current path...push plain text + s/(.*)\.(.*)/$1/; # strip flavor + push @p, "$_"; + } } $breadcrumbs = join $divider, @p; @@ -69,9 +81,12 @@ Optionally prepends the path with a link back to home. Alter $home as you please, leaving it blank to turn off the link to home. +Permalink patch: Links are generated by permalink::get_link(). $flavour +variable was added to control which flavour is appended. + =head1 VERSION -2003-03-18 +2003-03-18permalink Version number coincides with the version of Blosxom with which the current version was first bundled. @@ -80,6 +95,8 @@ Rael Dornfest , http://www.raelity.org/ +Permalink patch: Mark Ivey