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

[ ULTRAGlobals ] Sorting in All_Links_In_Category

Quote Reply
[ ULTRAGlobals ] Sorting in All_Links_In_Category
 
Hi,

I use:
Code:
<%Plugins::ULTRAGlobals::All_Links_In_Category($ID,'50')%>
<%if all_links_in_this_cat.length%>
<%loop all_links_in_this_cat%>
<%include link.html%>
<%endloop%>
<%endif%>

Is there a way to sort the list?
Quote Reply
Re: [gotze] [ ULTRAGlobals ] Sorting in All_Links_In_Category In reply to
Hi,

Its currently set to order by Title:

Code:
my $db_obj = $DB->table('Links','CatLinks','Category');
$db_obj->select_options ("ORDER BY Title DESC LIMIT $limit");

You can change this though in the .pm file /Plugins/ULTRAGlobals.pm

Just look for:

Code:
sub All_Links_In_Category {

(around linke 2018)

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] [ ULTRAGlobals ] Sorting in All_Links_In_Category In reply to
Thanks. Got it.

Challenge question: If I have a Field with enum(BBB,AAA,CCC) and wanted to list BBBs then AAAs then CCCs, how would I do that?
Quote Reply
Re: [gotze] [ ULTRAGlobals ] Sorting in All_Links_In_Category In reply to
Quote:
Challenge question: If I have a Field with enum(BBB,AAA,CCC) and wanted to list BBBs then AAAs then CCCs, how would I do that?

Mmm, not sure it could be done like that

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!