1 # Blosxom Plugin: breadcrumbs
2 # Author(s): Rael Dornfest <rael@oreilly.com>
4 # Documentation: See the bottom of this file or type: perldoc readme
8 # --- Configurable variables -----
10 # Should I prepend a link back home to the path?
11 # Specify a word to use for the link back to $blosxom::url or leave blank
16 # What divider should I use between path components (e.g. a > path > to...)
19 # --------------------------------
21 $breadcrumbs; # use as $breadcrumbs::breadcrumbs in flavour templates
25 my $fh = new FileHandle;
32 my($pkg, $path, $head_ref) = @_;
35 $path =~ s/\.$blosxom::flavour$//;
38 $home and push @p, qq{<a href="$blosxom::url/index.$blosxom::flavour">$home</a>};
40 foreach ( split /\//, $path ) {
45 ? qq{<a href="$blosxom::url$p/index.$blosxom::flavour">$_</a>}
49 $breadcrumbs = join $divider, @p;
60 Blosxom Plug-in: breadcrumbs
64 Populates $breadcrumbs::breadcrumbs with a clickable trail to
65 your current path in the weblog hierarchy (a la Yahoo!).
67 e.g. a/path/to/somewhere becomes
68 <a href="/a">a</a> :: <a href="/a/path">path</a> :: ...
70 Optionally prepends the path with a link back to home. Alter $home
71 as you please, leaving it blank to turn off the link to home.
77 Version number coincides with the version of Blosxom with which the
78 current version was first bundled.
82 Rael Dornfest <rael@oreilly.com>, http://www.raelity.org/
86 Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
88 Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
92 Address bug reports and comments to the Blosxom mailing list
93 [http://www.yahoogroups.com/group/blosxom].
97 Blosxom and this Blosxom Plug-in
98 Copyright 2003, Rael Dornfest
100 Permission is hereby granted, free of charge, to any person obtaining a
101 copy of this software and associated documentation files (the "Software"),
102 to deal in the Software without restriction, including without limitation
103 the rights to use, copy, modify, merge, publish, distribute, sublicense,
104 and/or sell copies of the Software, and to permit persons to whom the
105 Software is furnished to do so, subject to the following conditions:
107 The above copyright notice and this permission notice shall be included
108 in all copies or substantial portions of the Software.
110 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
111 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
112 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
113 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
114 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
115 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
116 OTHER DEALINGS IN THE SOFTWARE.