Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
Products
:
Gossamer Links
:
Development, Plugins and Globals
:
category number of link
Previous Thread
Next Thread
Print Thread
View Threaded
Jun 29, 2009, 4:15 AM
nir
User
(396 posts)
Jun 29, 2009, 4:15 AM
Post #1 of 7
Views: 4419
Shortcut
category number of link
How can I send category ID and get the number of link in this category
Jun 29, 2009, 5:18 AM
Andy
Veteran
/ Moderator
(18436 posts)
Jun 29, 2009, 5:18 AM
Post #2 of 7
Views: 4300
Shortcut
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!
Jun 29, 2009, 5:35 AM
nir
User
(396 posts)
Jun 29, 2009, 5:35 AM
Post #3 of 7
Views: 4257
Shortcut
Re: [Andy] category number of link
In reply to
I get this error
Error: Variable 'get_category_count' is not a code reference
Jun 29, 2009, 5:56 AM
Andy
Veteran
/ Moderator
(18436 posts)
Jun 29, 2009, 5:56 AM
Post #4 of 7
Views: 4249
Shortcut
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!
Jun 29, 2009, 6:16 AM
nir
User
(396 posts)
Jun 29, 2009, 6:16 AM
Post #5 of 7
Views: 4250
Shortcut
Re: [Andy] category number of link
In reply to
It work:)
Thanks
Jun 30, 2009, 1:30 AM
VishalT
Veteran
(1122 posts)
Jun 30, 2009, 1:30 AM
Post #6 of 7
Views: 4221
Shortcut
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
-------------------------------------------------------
Jun 30, 2009, 2:02 AM
Andy
Veteran
/ Moderator
(18436 posts)
Jun 30, 2009, 2:02 AM
Post #7 of 7
Views: 4197
Shortcut
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!
Previous Thread
Next Thread
Print Thread
View Threaded