I seem to have a problem with Playa + conditionals + snippets. I've emailed P&T since it may be an error in Playa.
I'm trying to accomplish a listings page where the information displayed depends on the membership package of each entry. If statements don't seem to work correctly, perhaps it's the parse order?
{exp:channel:entries channel="companies" dynamic="no"}
{!-- this works --}
{company_membership_package var_prefix="pkg"}
{pkg:title}
{/company_membership_package}
{!-- this works --}
{company_membership_package}
{title}
{/company_membership_package}
{!-- this fails - nothing displayed --}
{company_membership_package var_prefix="pkg"}
{if {pkg:title} == "Premium"}
{snp_company-listings_Premium}
{if:elseif pkg:title == "Premium"}
{snp_company-listings_Premium}
{/if}
{/company_membership_package}
{!-- this fails - outputs {snp_company-listings_Premium} --}
{exp:playa:children var_prefix="pkg"}
{snp_company-listings_{pkg:title}}
{/exp:playa:children}
{/exp:channel:entries}
{company_membership_package} is a Playa field.
Thanks,
Paul