Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

breadcrumb navigation in custom templates

Quote Reply
breadcrumb navigation in custom templates
Hello

This could be an idea:

I have several custom templates loaded by page.cgi
a few of them loads category/or link info by globals like

sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
my $id = $tags->{ID};
my $cat_info = $cat_db->get($id, 'HASH');
return $cat_info;
}

now it could be useful to load something like a 'breadcrumb' navigation (title_linked)
in this pages. (the title_linked tags works only with the category,cool,ratings & detailed templates

I use :

sub category_title_linked {

my $tags = shift;
my $id = $IN->param('ID') || $IN->param('CategoryID');
my $db = $DB->table ('Category');
my $cat = $db->get ($id, 'HASH', ['Name','Full_Name']);
my $title_linked = Links::Build::build ('title_linked', $cat->{Full_Name} . '/' . ' ');
return $title_linked;
}

for category navigation with the last category clickable

and:

sub link_title_linked {

my $tags = shift;
my $id = $IN->param('ID') || $IN->param('LinkID');
my $db = $DB->table ('Links');
my $link = $db->get ($id, 'HASH');
my ($cat_id, $cat_name) = %{$db->get_categories ($link->{'ID'})};
my $title_linked = Links::Build::build ('title_linked', $cat_name . '/' . ' ');
my $output .= qq~ $title_linked <A HREF="$CFG->{build_detail_url}/$link->{ID}">$link->{Title}</A>~;
return $output;
}

with the link clickable too

Does anybody else this too?
Subject Author Views Date
Thread breadcrumb navigation in custom templates ridesworld 1435 Dec 6, 2003, 3:49 AM
Post Re: [ridesworld] breadcrumb navigation in custom templates
pugdog 1365 Dec 6, 2003, 11:23 AM