Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category Info on Detailed Page?

Quote Reply
Category Info on Detailed Page?
hi,

does anyone know how I can pass the category info through the detailed pages? I can see it uses the generate_detailed_page subroutine, but need know what code to add to have it pass through all of the category details.

thanks,
regan.
Quote Reply
Re: [ryel01] Category Info on Detailed Page? In reply to
http://www.gossamer-threads.com/...e%20category;#251674

Did you search? Wink

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] Category Info on Detailed Page? In reply to
not well enough! Smile thanks andy!

Here's another hairy one for you - I've got an existing global that creates a menu on all of the other pages working off the category "ID" passed to that page.

The detail page also has an ID but this is the Link ID as apposed to the category ID. So here's the question - do you know of a test I can do at the top of my current global (or your global) to say... is this a category ID or a link ID being passed to me? That way I could work your solution into mine and cover both instances off in the one global.

hope that makes sense!?

regan.
Quote Reply
Re: [ryel01] Category Info on Detailed Page? In reply to
Code:
sub {

my $LinkID = $_[0];
my $CatID;

my $table = $DB->table('CatLinks');
my $sth = $table->select( { LinkID => $LinkID } ) || return $GT::SQL::error;

while (my $hit = $sth->fetchrow_hashref) {
$CatID = $hit->{CategoryID};
}

return { cat_id => $CatID };

}

Call that at the top of the template, and then that will grab the category ID for the link in question, so you can call your other global with something like;

<%global_name($cat_id)%>

....$cat_id should hold the Category ID of the link in question (untested).

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!