I want to insert a simple exception, using an "if" statement, into the flow of my Playa field's output. But it's not working. Can I get help?
Here's the code that works:
{prac_area_contact_people backspace="3"}
<a href="/people/bios/{url_title}"><nobr>{exp:tagstripper:stripAllTags}{people_first_name} {person_last_name}{/exp:tagstripper:stripAllTags}</nobr></a>,
{/prac_area_contact_people}
{/exp:channel:entries}
prac_area_contact_people
is the name of my Playa field.
I want to add some content to the end of the anchor tag in the 2nd line of the sample above, ONLY when the person_last_name
field is equal to a certain value.
So I did this:
<a href="/people/bios/{url_title}/{if person_last_name == 'pollack'}professional_liability{/if}">
The goal is that when the person_last_name
field is pollack
it adds on the extra segment in the URL. But the thing fails. What am I doing wrong?
people
for the first name, butperson
for the last name - is that intentional, or a typo (and it that your problem)?