Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
Conditional code for Playa relationships?
Is there any way to create a conditional block, such that if an entry has no related entries (via Playa) then I can block the entire "Related Entries" div from showing. {if} {if:else} etc. I would really rather just hide the "Related Entries" block rather than show "Related Entries: none" or the like. KWIM?
Official
Response
-
Easy:
{if my_playa_field}
{related_entries id="my_playa_field"}
{title}
{/related_entries}
{if:else}
No related entries :-(
{/if}
-
Easy:
{if my_playa_field}
{related_entries id="my_playa_field"}
{title}
{/related_entries}
{if:else}
No related entries :-(
{/if} -
-
my_playa_field...
woo-hoo! I think I tried just about EVERYTHING else!
Thanks for this great Extension! -
-
-
Yes.
-
-
-
-
Loading Profile...



EMPLOYEE
