Matt Hampel
Matt Hampel

Reputation: 5237

Display in block only if there is no data

In Drupal 7, you can add headers and footers to blocks that will display even when the view generating them has no results.

Is there any way to use PHP to display text in one of those areas when the view returns no results? The same thing expressed in pseudocode:

if view has no results:
  echo "Custom message/code here"

Upvotes: 0

Views: 1370

Answers (1)

Will
Will

Reputation: 900

View has such "No results behavior" built-in.

You can find than under "advanced" section.

Upvotes: 4

Related Questions