Conditionally show different column if looper provider has no posts

Hi Guys,

I’ve got a bit of a looper challenge that I’m hoping you can help me with.

I have created a Row looper provider that shows details for my post type (vacancies)

However, there won’t always be a vacancy(post).

I am wondering if it is possible to conditionally show a different column (populated with text that says " no vacancies) if the looper provider has no posts to show?

I am sure this is possible but I can’t quite get my head around it.

Thanks in advance! and Happy Friday!

Niall

Hi Niall,

Thanks for reaching out.
You can do that by following the below steps.

  1. Add the condition of {{dc:looper::count}} is greater than 0 to the Row where you have added the Looper Provider, so it will show when the Looper return the value.

  1. Duplicate the Row and modify the condition to {{dc:looper::count}} is equals to 0, so it will be shown when the Looper return the no vacancies.

  1. Modify the Column of the 2nd Row with the No Vacancies message.

Hope it helps.
Thanks

Hi Tristup,

I was really hoping that would work but it isn’t :frowning:

Instead the column just disappears.

Any other ideas?
I’ve left a secure note.

Hello There,

Sorry for the confusion. Please use “Provider Output is empty” and “Provider Output is not empty” as your conditions to each of the column consumers.

Screen Shot 2021-06-12 at 4.35.54 AM

I have removed the Driving Vacancies to test this out and I have restructured your consumer columns to give you an example as shown above.

Please see the secure note.

Thanks very much Ruenel!

This solved the problem perfectly.

Have a great day!

Hi Niall,

Glad that we are able to help you.

Thanks

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