Webmastersite.net
Register Log In

Making text appear conditionally - help

Title Making text appear conditionally - help
Description Not sure how to use the IF tag...
Message Text I have set up a "featured" link type for sponsored links, and I want to have them preceeded by a simple "Sponsored Links:" before the first link. However, I do not want this text to appear if there are no sponsored links. How can I do this? Here's what I have:
<table width="100%" cellpadding="5" cellspacing="10">
<p><b>Featured Links:</b>
<!-- BEGIN FEATURED LINKS -->
<td {LINKWIDTH} valign="top" class="link">
<b><IF {LINKURL}>
<a href="{TRACKLINKURL}" {EXTERNALLINKS}>{LINKTITLE}</a>
<OTHERWISE>
{LINKTITLE}
</IF></b>
 <font face="verdana" size="1" color="#9C9C9C"><b>{LINKURL}</b></font> {LINKNEW} {LINKISUPDATED} {LINKADMIN} 
<IF {LINKISREAD}><img src="templates/default/images/viewed.png"></IF>
<IF {SWITCH_PAGERANK}><br><a href="http://www.huebit.ws/tools/page_rank.php" target="_blank"><img src="http://www.huebit.ws/pagerank_dispenser.php?url={LINKURL}&type=1&op=1" alt="Google Pagerank Tool" border="0"></a></IF>
<br><i>{LINKDESCRIPTION} </i>
<font size=1><IF {SWITCH_RATINGS} and {LINKRATING}><br>Rating: {LINKSTARS} ({LINKRATING}/{MAXVOTE} based on {LINKVOTES} votes)</IF>
<IF {SWITCH_HITS}><br>Hits Out: {LINKHITS} | Hits In: {LINKHITSIN}</IF> <br>Submitted {LINKDATE}<IF {LINKLASTEDIT} is greater than {LINKTIME}>, edited {LINKLASTEDITDATE}</IF>
<br><IF {SWITCH_RATINGS}><a href="vote.php?id={LINKID}">Rate</a> | </IF><IF {SWITCH_REPORTS}><a href="report.php?id={LINKID}">Report</a> | </IF><IF {THISMEMBERGROUPCANEMAIL}><a href="email.php?id={LINKID}">E-mail</a> | </IF><a href="javascript:window.external.AddFavorite('{LINKURL}', '{LINKBOOKMARKTITLE}')">Bookmark</a>
<IF {SWITCH_ALBUMS} and {THISMEMBERISREGISTERED}>| <a href="albums.php?add={LINKID}">Add to List</a></IF>
 | <a href="{LINKDETAILSURL}">Details</a> <IF {SWITCH_COMMENTS}> | <a href="thread/{LINKID}">Comments (<IF {LINKCOMMENTSREAD}>{LINKNUMCOMMENTS}<OTHERWISE><b>{LINKNUMCOMMENTS}</b></IF>)</a> </IF>

<IF {THISMEMBERGROUPCANVIEWVOTES}><br><a href="showvotes.php?id={LINKID}">Show Individual Votes</a></IF> <IF {THISMEMBERISREGISTERED} and {THISMEMBERID} is {LINKOWNERID}> <IF {SWITCH_RATINGS}>| <a href="index.php?action=getvotingcode&id={LINKID}">Get voting code to place on your site</a></IF> <IF {SPONSORUSELINK} is yes><br><a href="link.php?action=sponsor&id={LINKID}">Move your link to the top: sponsor this category</a><br></IF>
</IF>

<IF {LINKFILEFIELD}><br>Attached files:<br>
<!-- BEGIN LINK ATTACHMENTS -->
<a href="download.php?id={LINKID}&attachid={ATTACHID}">{ATTACHFILETITLE}</a> ({ATTACHKB} KB, {ATTACHDOWNLOADS} downloads)<br>
<!-- END LINK ATTACHMENTS -->
</IF>

</font>
</td>
<!-- END FEATURED LINKS -->
</table>
I'm sure it's just a matter of putting an "IF" condition around the 2nd line, but I'm not sure how to format it or what it would look like completed. Can anyone help?
Rating
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0/5 based on 0 votes.
Ownership Errk!
Views 617 views. Averaging 0 views per day.
Similar Topics
Submission Date Dec 15, 2005 - 9:50 PM