In pseudo code
Based on the value of the honor_type taxonomy, I would like different output:
if Honor_Type = "Faculty"
output <h4 class="class-of">Years of Service {{ post.vod_class_of_tax.name }}</h4>
else
output <h4 class="class-of">Years of Service {{ post.vod_class_of_tax.name }}</h4>
end if
Is this possible with Twig? If so, how?
Here's the Twig code I have in the View:
<div class="card-heading">
<h4 class="honor-type">
{% for item in post.vod_honor_type_tax %}
{{ item.name }}
{% endfor %}</h4>
<h1 class="honoree-name">{{ post.vod_honoree_names }}</h1>
<h4 class="class-of">class of {{ post.vod_class_of_tax.name }}</h4>
</div>
It's the last line containing the h4 that I need to vary based on the value of vod_honor_type.
Thanks for any help you can give.