Gossamer Forum
Home : Products : Gossamer Links : Discussions :

title_linked indicator

Quote Reply
title_linked indicator
Hi,

Does anybody know where it is possible to change the way the <%title_linked%> function displays the indication to the user of which part of the site he/she is in and a link to previous categories...

For example on the demo this is an example :
Home : Architecture : Associations : AIA Chapters

and I would like to have :
Home > Architecture > Associations > AIA Chapters

Any ideas ?

Thanks, Jag
Significant Media
Quote Reply
Re: [Jag] title_linked indicator In reply to
Hi. Something like this should do the trick;

<%edit_title_linked($title_links)%>

edit_title_linked =>

Code:
sub {
my $in = $_[0];
$in =~ s|\:|&gt;|g;
return $in;
}

Hope that helps.

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] title_linked indicator In reply to
Thanks Andy I'll give it a whirl.

BTW the Thumb_Images plug-in works a great for creating a little image next to my links. It's getting on nicely Smile

Jag
Significant Media
Quote Reply
Re: [Jag] title_linked indicator In reply to
NP.

Quote:
BTW the Thumb_Images plug-in works a great for creating a little image next to my links. It's getting on nicely

Cool

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] title_linked indicator In reply to
In Reply To:
Hi. Something like this should do the trick;

<%edit_title_linked($title_links)%>

edit_title_linked =>

Code:
sub {
my $in = $_[0];
$in =~ s|\:|&gt;|g;
return $in;
}

Hi Andy,

Got this error :

Error: Variable 'edit_title_linked' is not a code reference

both using :

<%edit_title_linked($title_links)%>
and
<%edit_title_linked($title_linked)%>

Created the routine "edit_title_linked" in globals.

Unsure

Do you have any idea where this is actually formatted. I was also wanting to bold the page the user is on as well as replacing the ":" with a ">".

Jag
Significant Media

Last edited by:

Jag: Aug 18, 2004, 4:16 PM
Quote Reply
Re: [Jag] title_linked indicator In reply to
Found the easier way =)

In /admin/Links/Build.pm, you need to find the routine "sub build_title_linked". Then find;

Code:
my $output = $home ? qq| <a href="$CFG->{build_root_url}/$CFG->{build_index}">$top</a> :| : '';
for (0 .. $#dirs) {
my $path = "/" . $db->as_url( join "/", @dirs[0 .. $_] );
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> :|;
}

..and change the parts in "RED" to whatever you want. That should do it :)

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] title_linked indicator In reply to
Thanks Andy, just did the mod in Build.pm and it works fine !

If I was wanting to bold the actual area that the user is in that comes last so that it stands out is it also here that I would modify it.

I was wanting to modify :
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> &gt;|;
to ;
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> &gt; <b>|;

thinking that this is where the final part of the indicator would be placed and then add "</b>" to my template to finish the bold tag, but it's messy and I'm not sure if I've understood the code or not.

Thanks Jag
Significant Media
Quote Reply
Re: [Andy] title_linked indicator In reply to
Hi Andy

I've just come across this in the directory :

Destination > Americas > South America > Chili &g

The &g should be &gt; but is cut off and this happens all through the site it is built by this :
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> :|;

that I changed to this :
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> &gt;|;

Can you figure out why this is happening ?

Thanks John
Significant Media
Quote Reply
Re: [Jag] title_linked indicator In reply to
Quote:
Can you figure out why this is happening ?

Mmm... What does the HTML output look like? (i.e is it HTML escaped).

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] title_linked indicator In reply to
I just modified the second line in order to see what could be wrong.
Put it back to ":" as the original code was and it worked OK. I then put ">" instead of "&gt;" and it works fine. This obviously may not be displayed properly by certain browsers but I'm leaving like that for the moment.

So :
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> &gt;|;
doesn't work and
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> >|;
does (in IE6)

I guess the ";" that is in &gt; may be creating the problems when it is being parsed by some other routine.

Although I was getting :
Destination > Americas > South America > Chili &g
so both the "t" and the ";" get cut off somehow !

John
Significant Media
Quote Reply
Re: [Jag] title_linked indicator In reply to
This should work;

Code:
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a>| . q|&gt;|;

Note the q|| part at the end, which *should* stop anything bein executed between it (i.e trying to run the routine &gt, which wouldnt exist Tongue

Hope that helps.

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] title_linked indicator In reply to
Hi Andy thanks for your help. For some reason even putting it as you said creates the same problem with the final ">" being cut down to "&g". Anyway I'm going to finish my templates for the community plug-in (I thought they'd be the same as the other GT templates but there built fairly differently.
I'll try your new Thumbs Image plug-in again. It's great the simple 2.1 vers. so much so that I can't stand looking at my test pages without the images next to the links (that's why I'm waiting to try the other one since it replaces it).

Cheers, John
Significant Media