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

Fetch Category Name

(Page 2 of 2)
> >
Quote Reply
Re: [Paul] Fetch Category Name In reply to
Thanks Paul. That fixed the global. :)

Yes, I can sort by any field successfully. But that is kind of the problem. There is no field for the Category, therefore nothing to sort on :(
Quote Reply
Re: [Katana Man] Fetch Category Name In reply to
sb=Name would sort links based on their category name - Name is not a field in the links table.

It depends on the select call though. If it is a relation select including the Category/Links tables then passing in the category name field as the sb value should work, however this may not be how the code is setup.

I'll go and check.
Quote Reply
Re: [Katana Man] Fetch Category Name In reply to
Hmm yeah that won't work. The link select is done first and the category table isn't used. I think what you need would be quite tricky to implement.
Quote Reply
Re: [Paul] Fetch Category Name In reply to
I agree dammit.
Quote Reply
Re: [Katana Man] Fetch Category Name In reply to
It is achievable - just a bit pissy. I could be way off but the way I see you having to do it is adding a column into the links table. You'd need a small perl script to go through each link and insert the category name into the new column.

As you mentioned above it is a bit redundant though but I can't see another solution without manual hacking.

Last edited by:

Paul: Mar 26, 2003, 1:42 PM
Quote Reply
Re: [Paul] Fetch Category Name In reply to
Yep. Once that info is populated, how can I get future signups to automatically populate that field without presenting them with 2 Category fields. I wish I could do an input type=hidden, but that's not going to do the trick.
Quote Reply
Re: [Katana Man] Fetch Category Name In reply to
>>
I wish I could do an input type=hidden, but that's not going to do the trick.
<<

You'd probably need a small plugin - a POST hook on user_add_link to insert the category name.
> >