Gossamer Forum
Home : Products : Gossamer Links : Discussions :

If and elsif

Quote Reply
If and elsif
I am trying below code in link.html but it is not working, I was wondering if you guys can help me out?

<%if Image_URL%>
<%include link_image_url.html%>
<%elsif isSponsor%>
<%include link_sponsor.html%>
<%else%>
<%include link_normal.html%>
<%endif%>

and what about below tag.



<%if isSponsor%>
&nbsp;<img src="<%build_root_url%>/images/sponsor.gif">

<%else%>

<%if isNew%>
&nbsp;<img src="<%build_root_url%>/images/new_<%Days_Old%>.gif">&nbsp;&nbsp;
<%endif%>

<%if isChanged%>
<img src="<%build_root_url%>/images/updated.gif" width="44" height="12">&nbsp;&nbsp;
<%endif%>


<%if isPopular%>
<img src="<%build_root_url%>/images/popular.gif" width="44" height="12">&nbsp;
<%endif%>

<%endif%>


Even this one is not working on link.html it shows sponsor images next to every link.

Please help

Vishal
-------------------------------------------------------

Last edited by:

TRPN: Jul 23, 2002, 8:48 AM
Quote Reply
Re: [TRPN] If and elsif In reply to
Try

<%if Image_URL%>
<%include link_image_url.html%>
<%else%>

<%isSponsor%>
<%include link_sponsor.html%>
<%else%>
<%include link_normal.html%>
<%endif%>
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If and elsif In reply to
it is accepting the imageurl tag properly but for other two tags it is giving error. It is showing listings twice - once with sponsor code and once with normal code. :(

Vishal
-------------------------------------------------------
Quote Reply
Re: [TRPN] If and elsif In reply to
Try with <%isSponsor eq "Yes"%>

(if you have set your isSponsor field to "Yes" and "No" values)

The way you want to display your listings now, it will list all isSponsor values ...

So ...

<%if isSponsor eq "Yes"%>
<%include link_sponsor.html%>
<%else%>
<%include link_normal.html%>
<%endif%>

or ...

Maybe better solution (I'm not sure)

<%if isSponsor eq "Yes"%>
<%include link_sponsor.html%>
<%endif%>

<%if isSponsor eq "No"%>
<%include link_normal.html%>
<%endif%>

Try, it might work Wink