{% if Entity.type == 'experiments_templates' %} {% set Entity_id = templateData.id %} {% else %} {% set Entity_id = Entity.id %} {% endif %}