When I use
{if no_results}
content
{if:else}
content
{/if}and view the page, it’s completely white. When I take the if statements out, the page shows up again. What am I doing wrong?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
May 09, 2008 1:27am
Subscribe [2]#1 / May 09, 2008 1:27am
When I use
{if no_results}
content
{if:else}
content
{/if}and view the page, it’s completely white. When I take the if statements out, the page shows up again. What am I doing wrong?
#2 / May 09, 2008 1:29am
if no_results is a predefined variable pair, you can’t use an if:else with it. That said, you don’t need to, as it’s an automatic.
So just use:
{if no_results}
code
{/if}
codethe second code will execute only if there are results.
#3 / May 09, 2008 3:16pm
project digital - you can read some more about how it works on this thread