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:
<%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%> <font color=red><small><sup>new</sup></small></font><%endif%>
<%if isPopular%> <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://
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%> <font color=red><small><sup>new</sup></small></font><%endif%>
<%if isPopular%> <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://