Page 1 of 11
Forum moderator: bigblog 
uCoz Community » General Information » First Steps with uCoz » Informer - If nothing outputs then display something (Informer - If nothing outputs then display something)
Informer - If nothing outputs then display something
nitroretroofficial
Posts: 12
Reputation: 0
Message # 1 | 9:16 AM
Hello uCoz Community!

Let's say I have an informer for a blog.

Normally, if there aren't any entries, the informer won't show anything.
I would want to show a <div> or <p> if there aren't any entries shown by the informer.

Is this possible? Thanks. biggrin
bigblog
yeah, i'm still here
Posts: 1354
Reputation: 65
Message # 2 | 4:22 PM
nitroretroofficial, use this code instead of the original informer code:
Code
<?if(len($MYINF_5$) == 0)?>
Replace this line with the text you want to be shown if there are no entries added in a specific module.
<?else?>
$MYINF_5$
<?endif?>

Be sure to put it using the HTML editor only, not the WYSIWYG one.

i breathe... sometimes
nitroretroofficial
Posts: 12
Reputation: 0
Message # 3 | 4:08 PM
Thanks bigblog, I always forget that you can check the length like that (on uCoz).
uCoz Community » General Information » First Steps with uCoz » Informer - If nothing outputs then display something (Informer - If nothing outputs then display something)
Page 1 of 11
Search: