I have a playa field product_videos and am using the following conditional to check if it is empty:
{if product_videos:total_children > 0}
//do something
{/if}
This seems pretty straight forward to me, what am I missing?
I should add the result is that the code inside the conditional never appears despite there being entries.
I have also tried:
{if "{exp:playa:total_children field='product_videos'}"}
//do something
{/if}
which is listed as a correct answer in this SO question, this results in a php error:
A PHP Error was encountered Severity: User Warning
Message: Invalid EE Conditional Variable: {if "exp:playa:total_children entry_id="285" field='product_videos' var_prefix="playaDbig9XJo"}
Filename: libraries/Functions.php
Line Number: 2855