Gossamer Forum
Home : Products : Gossamer Links : Discussions :

help with if statements in link.html

Quote Reply
help with if statements in link.html
My goal is to use one set of templates and have it cover all of our bases.

What I am hoping to have link.html do is this:

If there is a detailed page, link to that.
If there is a URL link to that
If there is no URL, and no detailed, link to nothing.

I have the following code in my template link.html:
Code:
<ul><li>
<%if Full_Story%><a href="<%detailed_url%>"><%body_font%><b> <%Title%></b></font></a>
<%else%><a href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%body_font%><b><%Title%></b></font></a> <%endif%>
<%if isNew%>&nbsp;<font color=red><small><sup>new</sup></small></font><%endif%>
<%if isPopular%>&nbsp;<font color=red><small><sup class="pop">popular</sup></small></font><%endif%>
<br>
<%if Description%><%body_font%><%Description%></font>
<%if Full_Story%><small> ...<a href="<%detailed_url%>">more</a></small><%endif%></font><%endif%>
</li>
</ul>

which does not account for no URL. I also want to set the field URL to be NotNull: YES to allow for not adding a url. The system will not allow this.

How can I do this? What would the exact language be? Is it as simple at an if statement? Is there a way to tell the system:

If URL=http:// then blah blah

And basically the system will ignore the default URL which is http://
Subject Author Views Date
Thread help with if statements in link.html Evoir 3102 Jul 22, 2002, 3:34 PM
Thread Re: [Evoir] help with if statements in link.html
yogi 3014 Jul 22, 2002, 10:51 PM
Thread Re: [yogi] help with if statements in link.html
Evoir 2997 Jul 23, 2002, 10:01 AM
Post Re: [Evoir] help with if statements in link.html
katabd 2990 Jul 23, 2002, 10:11 AM
Thread Re: [Evoir] help with if statements in link.html
yogi 2988 Jul 23, 2002, 1:09 PM
Thread Re: [yogi] help with if statements in link.html
Paul 2997 Jul 23, 2002, 1:12 PM
Post Re: [Paul] help with if statements in link.html
yogi 2984 Jul 23, 2002, 1:13 PM
Thread Re: [Paul] help with if statements in link.html
Evoir 2976 Jul 23, 2002, 1:50 PM
Thread Re: [Evoir] help with if statements in link.html
yogi 2971 Jul 23, 2002, 2:06 PM
Thread Re: [yogi] help with if statements in link.html
Evoir 2966 Jul 23, 2002, 2:23 PM
Thread Re: [Evoir] help with if statements in link.html
yogi 2966 Jul 23, 2002, 2:26 PM
Post Re: [yogi] help with if statements in link.html
Evoir 2964 Jul 23, 2002, 2:32 PM