Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Pb <%if Add_Date%> in link.html

Quote Reply
Pb <%if Add_Date%> in link.html
Hi,

I have a little problem with this part of the template link.html

<%if Add_Date%>
<small>(Added: <%Add_Date%>)</small> <br>
<%endif%>

I would like to display the Add_date Filed only if it is different from "0000-00-00". Someone knows how to do it?

I have tried with <%if (Add_Date > "0000-00-00")%> but it does not work.

Best regards

Ver__listes
Quote Reply
Re: [ver_listes] Pb <%if Add_Date%> in link.html In reply to
You can't do greater than on a date. Try:

Code:
<%unless Add_Date eq "0000-00-00"%>
Quote Reply
Re: [Paul] Pb <%if Add_Date%> in link.html In reply to
Thanks a lot for your fast answer. Waht is the full code?

<%unless Add_Date eq "0000-00-00"%>
<small>(Added: <%Add_Date%>)</small> <br>
<%endif%>

or

<%unless Add_Date eq "0000-00-00"%>
<small>(Added: <%Add_Date%>)</small> <br>
<%endunless%>

Thanks

ver_listes
Quote Reply
Re: [ver_listes] Pb <%if Add_Date%> in link.html In reply to
According to the docs you use <%endif%> with unless.

You could also say <%if Add_Date ne "0000-00-00"%>

or probably even <%ifnot Add_Date eq "0000-00-00"%>


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.