Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Use OR or AND in IF statement?

Quote Reply
Use OR or AND in IF statement?
Hi:

Within templetes, I know you can use this:

<%if variable eq 'string'%> text <%endif%>

But can you do (something like) this:

<%if variable eq 'string' or 'string'%> text <%endif%>

-- or --

<%if variable between 'string' and 'string'%> text <%endif%>

-- or even --

<%if variable > 'string' and < 'string'%> text <%endif%>


????

If so, is the above syntax right?

dave

Quote Reply
Re: Use OR or AND in IF statement? In reply to
No. I don't think so.
You need to use nested "if" statements.

Here are some updates to the template module, and more can be found in the docs I think (HELP from the admin).

http://gossamer-threads.com/p/125631

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Use OR or AND in IF statement? In reply to
Didn't think so, either. Oh well, maybe v 3.02...

Quote Reply
Re: Use OR or AND in IF statement? In reply to
Okay, so we can nest "if" statements. Are there any other standard perl statements at our disposal here besides <%if...%> (ie <%else...%>text<%endelse%>, etc) ?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Use OR or AND in IF statement? In reply to
There is no such tag as <%endelse%>

Read the link that pugdog provided for possible tags.

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/