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

Possible to get true/false tags from a global?

Quote Reply
Possible to get true/false tags from a global?
I'm trying to call a global, so it returns true if an entry exists with certain details, but it doesn't seem to be working very well Unsure

The global is:

Code:
sub {

# this is where we decide if a category is new or not...

my $ID = shift;

my $table = $DB->table('Category');
my $exists = $table->count( { Has_New_Links => "Yes", ID => $ID } );

if ($exists) { return 1; }
}

The tag I am using is;

<%if _has_new_links(8) == 1%>new<%endif%>

also tried;

<%if _has_new_links(8) eq "1"%>new<%endif%>
<%if _has_new_links(8)%>new<%endif%>

If I print out the tag, i.e;

<%_has_new_links(8)%>

...i tshows up as I would expect; 1 for links that the value is true on, and 0 for calls where it is not true.

I'm assuming this feature is supported in LSQL?

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!
Subject Author Views Date
Thread Possible to get true/false tags from a global? Andy 4018 Jun 20, 2003, 6:02 AM
Thread Re: [Andy] Possible to get true/false tags from a global?
Paul 3880 Jun 20, 2003, 6:25 AM
Thread Re: [Paul] Possible to get true/false tags from a global?
Andy 3891 Jun 20, 2003, 7:34 AM
Thread Re: [Andy] Possible to get true/false tags from a global?
carfac 3873 Jun 21, 2003, 12:33 PM
Thread Re: [carfac] Possible to get true/false tags from a global?
Andy 3849 Aug 22, 2003, 4:20 AM
Thread Re: [Andy] Possible to get true/false tags from a global?
yogi 3832 Aug 22, 2003, 8:12 AM
Post Re: [yogi] Possible to get true/false tags from a global?
Andy 3800 Aug 22, 2003, 8:16 AM
Thread Re: [yogi] Possible to get true/false tags from a global?
Andy 3779 Aug 22, 2003, 8:28 AM
Thread Re: [Andy] Possible to get true/false tags from a global?
pugdog 3784 Aug 22, 2003, 12:31 PM
Post Re: [pugdog] Possible to get true/false tags from a global?
Andy 3771 Aug 22, 2003, 11:50 PM