Gossamer Forum
Home : Products : Links 2.0 : Customization :

How do I make linkable titles in the detailed page?

Quote Reply
How do I make linkable titles in the detailed page?
As an example, see http://www.waterwater.ca/results/31.html. I have John Brooks Ltd as the title for the detailed page. Instead of that, how do I show:

Accessories>Cup Dispensers>John Brooks Ltd.

where Accessories (the category) and Cup Dispensers (the subcategory) are hyperlinked.

One confusing aspect of doing this is that John Brooks falls under more than one category. So if someone clicks through to John Brooks through Water Coolers (another category), which category will display on the detailed page, Accessories or Water Coolers?

Thanks for your help.
Quote Reply
Re: [ceniti] How do I make linkable titles in the detailed page? In reply to
Not really used to detailed pages. Does <%title_linked%> work for you?

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: [AndyNewby] How do I make linkable titles in the detailed page? In reply to
Hi Andy. Thanks. Well, it sorta worked. Have a look. http://www.waterwater.ca/results/31.html. It should read:

Main>Coolers:Bottled>John Brooks Co Ltd

Any clue on what to change?
Quote Reply
Re: [ceniti] How do I make linkable titles in the detailed page? In reply to
Hey you should have told me you needed that doing, I wouldn't have minded :)

Take a look at build_linked_title in nph-build.cgi
Quote Reply
Re: [RedRum] How do I make linkable titles in the detailed page? In reply to
That's OK, Paul. Thanks anyways. You did plenty of great work already. I don't want to take advantage of your generosity. Besides, it was an afterthought, and I don't mind getting my feet wet.

I'll look at build_linked_title and see if I can figure out what to change. if I have problems, I'll let you know with another post.
Quote Reply
Re: [ceniti] How do I make linkable titles in the detailed page? In reply to
Well, I'm almost there. The only thing that needs linking is the subcategory. How do I do that? I have:

sub build_linked_title {

# --------------------------------------------------------

# Returns a string of the current category broken up

# by section, with each part linked to the respective section.

my $input = shift;

my (@dirs, $dir, $output, $path, $last);

@dirs = split (/\//, $input);

$last = &build_clean(pop @dirs);



$output = qq| <A HREF="$build_root_url/">Main</A> :|;

foreach $dir (@dirs) {

$path .= "/$dir";

$dir = &build_clean ($dir);

$output .= qq| <A HREF="$build_root_url$path/">$dir</A> :|;

}

$output .= " $last";



return $output;

}



Also, in order to have a ">" instead of a ":" between them, do I need the special characters mod?

Quote Reply
Re: [ceniti] How do I make linkable titles in the detailed page? In reply to
remove
Code:
$last = &build_clean(pop @dirs);

Then change
Code:
$output = qq| <A HREF="$build_root_url/">Main</A> :|;

To:
Code:
$output = qq| <A HREF="$build_root_url/">Main</A> >|;

And:
Code:
$output .= qq| <A HREF="$build_root_url$path/">$dir</A> :|;

}

$output .= " $last";

To
Code:
$output .= qq| <A HREF="$build_root_url$path/">$dir</A> >|;
}
chop $output;

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] How do I make linkable titles in the detailed page? In reply to
Cool. It works. Thanks, King Junko II !!

I can't tell you how much we as novices appreciate having you folks who take the time to help us so much.