开发者

Display in block only if there is no data

开发者 https://www.devze.com 2023-03-30 06:52 出处:网络
In Drupal 7, you can add headers and footers to blocks that will display even when the view generating them has no results.

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 on开发者_开发百科e 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"


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

You can find than under "advanced" section.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号