Gossamer Forum
Quote Reply
category number of link
How can I send category ID and get the number of link in this categoryWhistle
Quote Reply
Re: [nir] category number of link In reply to
get_category_count
Code:
sub {
return $DB->table('Category')->select( ['Number_of_Links'], { ID => $_[0] } )->fetchrow;
}

call with:

<%get_category_count($ID)%>

(where $ID is the category ID)

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 number of link In reply to
I get this error
Error: Variable 'get_category_count' is not a code reference
Quote Reply
Re: [nir] category number of link In reply to
Did you copy it over right? Shouldn't have any spaces before "sub {" and after the last "}"

The code should be fine - can't see anything wrong with it.

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 number of link In reply to
It work:)
Thanks
Quote Reply
Re: [Andy] category number of link In reply to
Thanks for another cool little global.

P.S.. It would be really annoying now to even think about setting up an interesting GLinks based site without all the globals you have created.

Thanks again.

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] category number of link In reply to
Thanks - its amazing how much easier it is for me too, using the ULTRAGlobals functions - saves me a ton of time writing / finding globals on the forum =)

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!