Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Getting <%title_linked%> on review page

Quote Reply
Getting <%title_linked%> on review page
Hey all,

Anyone know how to get <%title_linked%> (The title of the category linked) on the reviews page? (review.cgi)

Do I need to create a global?

It's either this or getting the reviews to display properly on the detailed page (well, only one problem - it says "0 of Unknown Tag: 'Num' people found the following review helpful:" for all the reviews)...

Thanks a lot!

Stephen
Quote Reply
Re: [biketrials] Getting <%title_linked%> on review page In reply to
Try this

sub {
# Displays the title linked on Reviews page.
my $tags = shift;
my $table = $DB->table('CatLinks','Category');
$table->select_options('LIMIT 1');
my $fullname = $table->select ( ['Full_Name'],{ LinkID=> $tags->{'ID'}})->fetchrow_array;
my $fulltitle="$fullname/$tags->{'Title'}";
return GT::Plugins->dispatch ("$CFG->{admin_root_path}/Plugins", "build_title_linked", 1, $fulltitle);
}
Quote Reply
Re: [afinlr] Getting <%title_linked%> on review page In reply to
Hi Laura,

Thanks for your help! I get this error, though:

Error: Can't use string ("1") as a subroutine ref while "strict refs" in use at /home/virtual/site1/fst/var/www/cgi-bin/lsqldev-2.1.2/admin/GT/Plugins.pm line 108. Enironment:

Does that mean anything to you?

Take care,

Stephen
Quote Reply
Re: [biketrials] Getting <%title_linked%> on review page In reply to
Mm, I didn't think that was quite right but I hoped it might work anyway Tongue. It works on my site because I have a plugin which overwrites the title_linked code.

Having had another look at it, I think maybe the final line should be:

return Links::Build::build('title_linked',$fulltitle);
Quote Reply
Re: [afinlr] Getting <%title_linked%> on review page In reply to
Yes, thanks, that works perfectly! :-)

Thanks a lot, Laura!

Stephen