Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Info from one Table on page built from another.

Quote Reply
Info from one Table on page built from another.
Hi!

So lets say I wanted to use the name of the Category a link belongs to on the Links detail page. If I pit <%Title%> there, I am going to just get the LINK title, not the category title. How can I get the Category Title (or any other specified field) from the Category table in the Detail page....

Thanks in advance!

Dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Info from one Table on page built from another. In reply to
Hi,

The easiest way, would be a global:

get_cat_info
Code:
sub {
return { cat => $DB->table("Category")->get( { ID => $_[0] } ) }
}

I think you should have access to CatLinks.CategoryID from the template - so then do:

Code:
<%get_cat_info($CatLinks.CategoryID)%>
<%DUMP cat%>

Failing that working, we would just need to do one extra look up to find the category ID its in (from the CatLinks table)

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!

Last edited by:

Andy: Jan 18, 2016, 10:31 PM
Quote Reply
Re: [Andy] Info from one Table on page built from another. In reply to
Thanks Andy- I will give this a shot today....

I have previously associated the cat ID in each Link, so it should be easy to run that...
dave

Big Cartoon DataBase
Big Comic Book DataBase