Gossamer Forum
Home : Products : Gossamer Links : Discussions :

breadcrumb seperator

Quote Reply
breadcrumb seperator
I'm currently using a global format_title_override as below:

sub {
my ($title_loop, %options) = @_;
return unless $title_loop; my %vars = %{GT::Template->vars};
my $ret;
$options{separator} = GT::CGI::html_escape($options{separator}) unless $options{no_escape_separator};
for (0 .. $#$title_loop) {
next unless $_ or $options{include_home};
if ($options{link_type} == 1 or
($options{link_type} == 2 and $_ != $#$title_loop)) {
$ret .= qq|<a href="$title_loop->[$_]->{URL}">$title_loop->[$_]->{Name}</a>|;
}
else {
unless ($options{no_last} == 1 and $_ == $#$title_loop) {
$ret .= $title_loop->[$_]->{Name};
}
}
$ret .= $options{separator} unless $_ == $#$title_loop;
}
if ($options{link_type} == 3) {
$ret = qq|<a href="$title_loop->[-1]->{URL}">$ret</a>|;
}
return \$ret;
}

and I use no_last=>1 to drop the title at the end of the breadcrumb.

<%format_title_override($title_loop, separator => $crumb_separator, no_escape_separator => 1, include_home => 0, link_type => 2, no_last=>1)%>

however, it still shows the separator at the end of the final link. I want to keep the separator between the links, but not after the final link. does anyone have a good idea?

thanks.
Subject Author Views Date
Thread breadcrumb seperator joeybone 7455 May 14, 2010, 1:36 AM
Thread Re: [joeybone] breadcrumb seperator
Andy 7371 May 14, 2010, 2:30 AM
Thread Re: [Andy] breadcrumb seperator
joeybone 7290 May 14, 2010, 3:06 AM
Thread Re: [joeybone] breadcrumb seperator
Andy 7281 May 14, 2010, 3:09 AM
Thread Re: [Andy] breadcrumb seperator
joeybone 7268 May 14, 2010, 3:49 AM
Thread Re: [joeybone] breadcrumb seperator
Andy 7288 May 14, 2010, 3:52 AM
Thread Re: [Andy] breadcrumb seperator
joeybone 7314 May 14, 2010, 4:17 AM
Post Re: [joeybone] breadcrumb seperator
Andy 7294 May 14, 2010, 4:19 AM
Thread Re: [joeybone] breadcrumb seperator
Andy 7286 May 14, 2010, 4:33 AM
Post Re: [Andy] breadcrumb seperator
joeybone 7247 May 14, 2010, 5:10 AM