Gossamer Forum
Home : Products : Gossamer Links : Discussions :

how to edit <%Title_linked%>

Quote Reply
how to edit <%Title_linked%>
Hello everybody,



I would like my <%Title_linked%> to separate categories with something else than ":", possibly with a very small image. I looked at build.pm and didn't have a clue on what to do.

I also would like the <%Title_linked%> to not go back on the first two directories ie root and the first subcats under the root.

When a link <%Title%> has a "<i>" html tag, it (the tag) displays in the <%Title_linked%>. Why?

Has anyone edited <%Title_linked%> before?



Thank you for your time Smile
Quote Reply
Re: [nt6] how to edit <%Title_linked%> In reply to
I think you can get rid of the ":" in build.pm

As far as the other.....you got me

sub build_title_linked {
# ------------------------------------------------------------------
# Generate a linked title.
#
my $input = shift;
my $complete = 0;
my $home = 1;
if (ref $input) {
$complete = $input->{complete} || 0;
$home = defined $input->{home} ? $input->{home} : 1;
$input = $input->{name};
}
my (@dirs, $dir, $output, $path, $last, $db, $top);

$db = $DB->table('Category');
$top = Links::language('LINKS_TOP') || 'Top';

@dirs = split (/\//, $input);
$last = pop @dirs unless ($complete);
$output = $home ? qq| <a href="$CFG->{build_root_url}/$CFG->{build_index}">$top</a> :| : '';
for (0 .. $#dirs) {
$path = "/" . $db->as_url ( join "/", @dirs[0 .. $_] );
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> :|;
}
if ($complete) {
chop $output; chop $output;

Regards,
Clueless

Quote Reply
Re: [nt6] how to edit <%Title_linked%> In reply to
Hi NT6

I'm not sure I follow everything you need but this may get you closer to what you want:


In category.html all avaliable tags are displayed at the top of the page.

"I also would like the <%Title_linked%> to not go back on the first two directories ie root and the first subcats under the root."

category_short => Just the last part of the category.
"When a link <%Title%> has a "<i>" html tag, it (the tag) displays in the <%Title_linked%>. Why? "
You should be able to modify this in the link.html template and or subcategory.html template ?


Regards

minesite
Quote Reply
Re: [nt6] how to edit <%Title_linked%> In reply to
Try creating a new global;

Code:
sub {
my $vars = shift;
my $title_linked = $vars->{title_linked};
$title_linked =~ s|^\s+<[^>]+>|<a href="http://www.ace-installer.com">|;
return $title_linked;

}

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!

Last edited by:

Andy.: Apr 25, 2002, 2:22 AM
Quote Reply
Re: [Andy] how to edit <%Title_linked%> In reply to
How do I edit <%title_linked%> on the detailed page to look more like this

<a href="http://www.domain.com/Category/">Category</a>


instead of


<a href="http://www.domain.com/>Home</a>:<a href="http://www.domain.com/Category/">Category</a>:Title
Quote Reply
Re: [Abusaki] how to edit <%Title_linked%> In reply to
Try;

Code:
$title_linked => s|\Q<a href="\E(.*)\Q">Home</a>:|i;

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] how to edit <%Title_linked%> In reply to
Thanks Andy,
where exactly do I put this
Quote:

$title_linked => s|\Q<a href="\E(.*)\Q">Home</a>:|i;


in the detailed.html or as a globaland call it in the detailed.html
Quote Reply
Re: [Abusaki] how to edit <%Title_linked%> In reply to
Hi. Should work by putting it just after;

Code:
my $title_linked = $vars->{title_linked};

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] how to edit <%Title_linked%> In reply to
Hi Andy,
Could youplease tell me which file I can find this in
Quote Reply
Re: [Abusaki] how to edit <%Title_linked%> In reply to
Name Andy's global title_linked2 or something of the sort. In your detailed.html template change <%title_linked%> to <%title_linked2%>.

Hope this helps,

- Jonathan
Quote Reply
Re: [jdgamble] how to edit <%Title_linked%> In reply to
Should I name this code title_linked2
Quote:

$title_linked => s|\Q<a href="\E(.*)\Q">Home</a>:|i;