Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Shorter Navbar?

Quote Reply
Shorter Navbar?
Hello.

Is there a way to display a shorter navbar?

I want change my navbar from:

Cat1/Cat2/Cat3/Cat4/Cat5/

to:

Cat3/Cat4/Cat5/


Knubbel
Quote Reply
Re: [Knubbel] Shorter Navbar? In reply to
So get rid of the first few entries? Should be possible with a global (which works out how many elements there are, and then gets rid of the all minus the last 3 or something)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Shorter Navbar? In reply to
Hi.

I want not display the first cats.


Example:

Home > Cat1 > Cat2 > Cat3 > Cat4 > Cat5

-3 cats to:

Cat3 > Cat4 > Cat5


Is it possible to make a "dynamic global"?

For example:

<%TheGlobal(3)%> - takes 3 cats.
<%TheGlobal(2)%> - takes 2 cats....

knubbel
Quote Reply
Re: [Knubbel] Shorter Navbar? In reply to
Quote:
<%TheGlobal(3)%> - takes 3 cats.
<%TheGlobal(2)%> - takes 2 cats....

By "takes" .. do you mean KEEPS the last xx cats, or REMOVES the first xx cats?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Knubbel] Shorter Navbar? In reply to
Untested, but try this:

redo_breadcrumb
Code:
sub {
my $title_loop = $_[0];
my $num_to_keep = $_[1];

my @back_loop;
my $i = 0;
foreach (@$title_loop) {
$i++;
if ($i < $num_to_keep) { next; }
push @back_loop, $_;
}

return { title_loop => \@back_loop };

}
Call with:

Code:
<%redo_breadcrumb($title_loop,3)%>

This woudl get rid of the FIRST 3 entries from the breadcrumb.

Untested (not got a lot of free time ;)) .. but should work ok

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Shorter Navbar? In reply to
oh thanks. i will try it.
must i place

Code:
<%redo_breadcrumb($title_loop,3)%>
into
Code:
<%Links::Utils::format_title($title_loop, separator => $crumb_separator, no_escape_separator =>
$no_escape_crumb_separator, include_home => 1, link_type => 2)%>
?
Quote Reply
Re: [Knubbel] Shorter Navbar? In reply to
Hi

Place it right above this bit:

<%Links::Utils::format_title($title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Shorter Navbar? In reply to
it works. cool Smile

Big thanks to you...

Quote Reply
Re: [Knubbel] Shorter Navbar? In reply to
Cool, glad to hear Cool

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!