Ticket Details template & ticket.type condition

  • 29 October 2018
  • 5 replies


I'm trying to to customize our Ticket Details template to load an additional div when the Ticket Type is "Schedule a Session".

I'm using the following code; however, it is showing up on all of our tickets - not just the type I'm aiming for. Any ideas what I might be doing wrong?

{% if ticket.type == ‘Schedule a Session’ %}
<p>Ipsum Lorum</p>
{% endif %}

I've also tried ticket.type_name with no luck. 

5 replies

Hi Jessica, can you try the following?

{% if {{ticket.type}} == 'Schedule a Session' %}
<p>Ipsum Lorum</p>
{% endif %}

Note the curly brackets around the placeholder. 

Thanks for the reply!

Unfortunately, that makes it so the Ipsum Lorum doesn't show up on any tickets.

Hello Jessica, 

After some further investigation, looks like the placeholder was incorrect.

It should be "{{ticket.ticket_type}}"

Try the following code, this should work: 

{% if {{ticket.ticket_type}} == 'Schedule a Session' %}
<p>Ipsum Lorum</p>
{% endif %}


That works! Thank you!!

Hey hey, would this be possible for a custom ticket field?

Something like:

{% if {{ticket.custom-field88888}} == 'something' %}  
 <p>Ipsum Lorum</p>{
% endif %}