This is a snippit of my php code:
PHP Code:
$getlinks = $DB_site->query("SELECT * FROM site_nav_main");
while($link = $DB_site->fetch_array($getlinks))
{
eval('$links .= "' . fetch_template('sitenavdetail') . '";');
}
one of the fields returned in $getlinks array is called $link['uselink'] which is simply a 1 (toggles the link on) or 0 (toggles it off).
In my template "sitenavdetail", i have the following:
HTML Code:
<tr>
<td class="$link[itembgcode]" background="$stylevar[imgdir_misc]/header/content_bg_$link[itembgcode].gif">
<img src="$stylevar[imgdir_misc]/clear.gif" width="11" alt=" " border="0" /><span class="smallfont"><strong><if condition="$link[uselink]==1"><a href="$link[itemurl]"></if>$vba_options[portal_blockbullet] $link[itemtext]</strong><if condition="$link[uselink]==1"></a></if></span>
</td>
</tr>
In the above code, Im using
<if condition="$link[uselink]==1"> to determine if the text should be assigned a url or not.
Problem im having is that its not working. Its still adding the href to everything returned. Can you spot my error?