Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: category dir names

Quote Reply
Re: category dir names In reply to
Just change mine to:

if ($rec->{$LINKS{build_directory_field}}) { return $rec->{$LINKS{build_directory_field}}; }
else { $name =~ s/\s/_/g; $name =~ s/[^\w\d\_\-\/]/_/g; return $name; }

to only use it if a field has been entered, otherwise revert to the other way.

If you change build_linked_title to:

Code:
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 = pop @dirs;

$output = qq| <A HREF="$LINKS{build_root_url}/">Top</A> :|;
for (0 .. $#dirs) {
$path .= "/" . &build_clean_name( join "/", @dirs[0 .. $_] );
$output .= qq| <A HREF="$LINKS{build_root_url}$path/">$dirs[$_]</A> :|;
}
$output .= " $last";
return $output;
}

It will now work with Detailed pages. I've tested this a little on my demo and it's working well.

Cheers,

Alex
Subject Author Views Date
Thread category dir names widgetz 7962 Oct 23, 1999, 9:22 AM
Post Re: category dir names
widgetz 7710 Oct 22, 1999, 9:12 PM
Post Re: category dir names
widgetz 7732 Oct 22, 1999, 10:02 PM
Post Re: category dir names
pugdog 7737 Oct 23, 1999, 2:36 AM
Post Re: category dir names
Fortune 7748 Oct 23, 1999, 5:57 AM
Post Re: category dir names
widgetz 7767 Oct 23, 1999, 10:26 AM
Post Re: category dir names
widgetz 7736 Oct 23, 1999, 10:28 AM
Post Re: category dir names
Fortune 7720 Oct 23, 1999, 2:43 PM
Post Re: category dir names
widgetz 7725 Oct 23, 1999, 3:25 PM
Post Re: category dir names
widgetz 7727 Oct 23, 1999, 3:37 PM
Post Re: category dir names
Fortune 7718 Oct 23, 1999, 6:26 PM
Post Re: category dir names
widgetz 7746 Oct 23, 1999, 6:52 PM
Post Re: category dir names
widgetz 7725 Oct 23, 1999, 9:05 PM
Post Re: category dir names
Alex 7726 Oct 24, 1999, 8:03 AM
Post Re: category dir names
widgetz 7741 Oct 24, 1999, 8:29 AM
Post Re: category dir names
widgetz 7716 Oct 24, 1999, 8:48 AM
Post Re: category dir names
Alex 7739 Oct 24, 1999, 10:10 AM
Post Re: category dir names
widgetz 7726 Oct 24, 1999, 10:37 AM
Post Re: category dir names
Alex 7739 Oct 25, 1999, 8:40 AM
Post Re: category dir names
widgetz 7721 Oct 25, 1999, 11:06 AM
Post Re: category dir names
Alex 7724 Oct 25, 1999, 2:23 PM
Post Re: category dir names
widgetz 7739 Oct 25, 1999, 4:31 PM
Post Re: category dir names
widgetz 7752 Dec 4, 1999, 4:16 PM
Post Re: category dir names
pugdog 7725 Dec 4, 1999, 5:23 PM