Provider Empty

Hello Support,

We have a custom looper. When there’s no result, the following are returned.

Size: 1
Current Data:
array(1) {
 [0]=>
 NULL
}

Since the Size is one, Provider Empty condition is not triggered. What is the condition we can used to display a message when provider is empty?

Hi @INcroatia,

Thanks for reaching out.
If Provider Output is Empty is not working, you can use the {{dc:looper:count}} and check if that is greater than 0 or not.

Hope it helps.
Thanks

@tristup,

Please as you can see on the result, the size is 1 thus {{dc:looper:count}} check with 0 will not work.
Same with this thread: Condition on looper provider
This one doesn’t work either.
Hierarchical taxonomy is empty - how to tell the looper?

Hi @INcroatia,

In that case, you need to modify the Custom Looper and return NULL directly instead of putting that into the array.

Thanks

Please provide a sample because it was not provided in the documentation. No matter what setup in the code, the format returns like that. If you don’t know the answer, please give this to Ruenel or Charlie. Thank you.

Hi @INcroatia,

The Custom Looper is for custom coding and that is beyond the scope of Theme Support. I would suggest you hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where we answer the questions beyond normal theme support.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.