Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Multiple IF statement

Quote Reply
Multiple IF statement
In my database I have two options, for want of a better example I will call them A and B, which are not required fields.

In the page templates I would like to have A displayed if A has content. If A doesn't have any content then I want B displayed but if neither A nor B has content then I would like the page to display some default text.

My problem is I can't figure what the syntax of the statement would be. Crazy

Any assistance will be greatly appreciated.

--

Kriis
Quote Reply
Re: [kriis] Multiple IF statement In reply to
<%if A%>
<%elsif B%>
<%else%>
<%endif%>


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Multiple IF statement In reply to
That was it, I didn't know the <%elsif%> tag. Thanks muchly!

--

Kriis
Quote Reply
Re: [kriis] Multiple IF statement In reply to
A good reference can be found clicking on Help, then Table of Contents, then GT::Module Documentation and then scroll down and click on Template. It explains all the tags you can use. You can also find more info in the PDF manual.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Multiple IF statement In reply to
Excellent suggestion Alex, thank you.

I wish I had understood what GT::Module meant earlier! (Not that I understand what it stands for now by any means, just that I now know it contains a dictionary for the script).

--

Kriis