Gossamer Forum
Quote Reply
Multiple 'if's ?
Does anytone know if it is possible to use multiple 'if' statements in one tag?

i.e.

<%if Field eq "something" and AnotherField eq "test"%>

do this

<%endif%>

If I do this kind of thing, I don't get an error, but I don't get anything shown either....has anyone got an idea on the right syntax?

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] Multiple 'if's ? In reply to
RTFM

admin.cgi?do=help;topic=help_guide_libs.html

GT::Template
Quote Reply
Re: [Andy] Multiple 'if's ? In reply to
Should be working like this.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Multiple 'if's ? In reply to
Sorry Ivan, I meant to say using an 'or', not 'and'. The 'and' tags work fine...its just the 'or's Unsure

Cheers

BTW Paul...please watch your language ;)

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] Multiple 'if's ? In reply to
Still.

In the GMail templates, I see:
Code:
<%if page eq 'compose.htm' or page eq 'compose_html.htm'%>

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [Andy] Multiple 'if's ? In reply to
Quote:
BTW Paul...please watch your language ;)

Which bit?

Was it the letter R or was it the F? Laugh
Quote Reply
Re: [yogi] Multiple 'if's ? In reply to
Mmmm...it seems to be working now... Crazy

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: [Paul] Multiple 'if's ? In reply to
Both Wink Seriously....it doesn't set a great example for other users :(

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] Multiple 'if's ? In reply to
But I never said anything. Anyone who doesn't understand what it means won't be offended Tongue and anyone who does, will know what I'm getting at Tongue
Quote Reply
Re: [Paul] Multiple 'if's ? In reply to
Ok so here is a question that also might be in the manual but I can't make it work!

Compare the value of two fields:
<%if Add_Date eq Mod_Date%>Never changed<%else%>modified <%Mod_Date%><%endif%>

What am I doing wrong?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Multiple 'if's ? In reply to
Try:

<%if Add_Date eq $Mod_Date%>
...
Quote Reply
Re: [Paul] Multiple 'if's ? In reply to
Thanks Paul - did the trick!

http://www.ameinfo.com