Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Is there an "and/or" option for tags?

Quote Reply
Is there an "and/or" option for tags?
I have 3 custom fields - Item1, Item2 and Item3.

I'm trying to get them to work together on one line but not having much success. I can get them to work on separate lines with the following code:
Code:
<table >
<%if Item1%><tr><td><%Item1%></td></tr><%endif%>
<%if Item2%><tr><td><%Item2%></td></tr><%endif%>
<%if Item3%><tr><td><%Item3%></td></tr><%endif%>
</table>
With this code it will display any arrangement of Items e.g. 1 and 3 if there is no 2, 2 and 3 if there is no 1, etc. but when I take the table arrangement away everything changes. If there is no Item1 it won't display 2 or 3 because my tags are incorrect.

This is the sort of thing that I've tried:

Code:
<%if Item1%><%Item1%><%endif%> <%if Item2%><%Item2%><%endif%> <%if Item3%><%Item3%><%endif%>

Is there some other tag that I can use? I'm looking for something like <%andif%> or <%if Item1 and/or Item2 and/or Item3%>. I know that these aren't valid tags but it's the only way I can think of explaining it.
Subject Author Views Date
Thread Is there an "and/or" option for tags? MJB 2065 Jan 23, 2012, 3:07 PM
Post Re: [MJB] Is there an "and/or" option for tags?
Andy 2002 Jan 24, 2012, 12:11 AM