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

breadcrumb navigation in custom templates

Quote Reply
breadcrumb navigation in custom templates

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


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?
Quote Reply
Re: [ridesworld] breadcrumb navigation in custom templates In reply to

My whole purpose for writing detail_page.cgi was because the linked title navigation was _not_ available on the detail page. The second major reason was to provide dynamic detail pages for static sites.

If you look at detail_page.cgi you'll see a block of commented code on the title_linked. I think you can probably turn that into a global, if you pass it the right information.

The problem with Links SQL, is that in order to implement the multiple category function, the link contains _no_ location data. It's linked into the system via the CatLinks table. In order to follow/track breadcrumbs, you'd need to write the current category/location into the session data, and pull it back when you wanted to find out where you are. This get's really tricky.

The one solution that would make sense, is to modify the global to pull _all_ the categories the link is listed in, and put several linked title bars across the top of the link, so the user could navigate back to _any_ of the potential categories.

PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.