Craigr
Active member
I currently have 81 pages on my site created. I was going to use a template for each page so i can easily change the content if i make minor changes.
On each page i have managed to pull web links from a separate SQL table (i imported from previous forum software install).
I am wondering how to show if there is an empty result. This is my code for now:
Works fine when there are 1 or more results, but when i have no results from the database i get Web Links and no text. Ideally i would like to have some text to say no links added. Was wondering if i could do it via conditional statements, but had no success?
Thanks, Craig
On each page i have managed to pull web links from a separate SQL table (i imported from previous forum software install).
I am wondering how to show if there is an empty result. This is my code for now:
Code:
<strong>Web Links:</strong><br />
<xf:foreach loop="$links" value="$links" if="$links.link_catid == 46">
<xf:if is="$xf.visitor.is_admin"><span style="float:right">[ <em>{$links.link_hits} Hits</em> ]</span></xf:if><strong>• <a href="{$links.link_url}" target="_blank">{$links.link_name}</a></strong> - {$links.link_description}<br />
</xf:foreach>
Works fine when there are 1 or more results, but when i have no results from the database i get Web Links and no text. Ideally i would like to have some text to say no links added. Was wondering if i could do it via conditional statements, but had no success?
Thanks, Craig