I'm trying to come up with an if/then statement to show search keywords (in a table)
when there are keywords entered, if not then it should not show.
In my case it's a table that needs to be shown with the following code:
Code:
<table>
<tr>
<td valign="top"><img src="{$ImagesDir}/icon.gif" width="15" height="17"></td>
<td>{$lng.lbl_related_keywords} <br>{foreach from=$keywords item=keyword}<a href="_search.php?q={$keyword}">{$keyword}</a> {/foreach}<br></td>
</tr>
</table>
[b]
This is what I tried (without success):
Code:
{if $keywords ne ""}
<table>
<tr>
<td valign="top"><img src="{$ImagesDir}/icon.gif" width="15" height="17"></td>
<td>{$lng.lbl_related_keywords} <br>{foreach from=$keywords item=keyword}<a href="_search.php?q={$keyword}">{$keyword}</a> {/foreach}<br></td>
</tr>
</table>
{/if}
Can anybody help me with this?
Thanks in advance!