Powered by MediaWiki
Personal tools

Tag display if empty

From b2evolution manual

Jump to: navigation, search

Display message if there are no any posts.

[edit] Example

<source lang="php"> <?php

  display_if_empty( array (
'before' => '

', 'after' => '

',
     'msg_empty' => 'Sorry, there is nothing to display...'
   ) );

?> </source>

[edit] Parameters

Name Default Usage
before '<p class="msg_nothing">' Displayed before message.
after '</p>' Displayed after message.
msg_empty 'Sorry, there is nothing to display...' Default message text to display.

[edit] Return value

This function return false, if there are no any posts.
If there are some posts then this function return true and displays content.