No Results Handling

In some instances, there could be no data being pulled back via HAPI calls. For example, if there are no upcoming events then no events will be displayed

As a result, you can add code to the outerblock to handle the no results.

  1. data-pv-noresultsmessage="your message here" will display this message if no data is returned

  2. data-pv-noresultshide=" id or class" and can hide it if there are no results by adding a display: none in the CSS on the page

  3. data-pv-noresultsshow=" id or class" and can show it if there are no results by adding a display none in the CSS on the page

<div data-pv-component="event" data-pv-type="eventList" data-pv-noresultsmessage="There are no upcoming events, stay tuned!" data-pv-object="abc">
    // Some code
</div>

Last updated