Issue with multiples conditions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue with multiples conditions

agathe
Hello,
I have an issue with my conditions.
I want to have a different value depending of the product name.
So when product_ name= PER_TRIP_WAIVER, i want to display Insuranve waiver (taxes included)
When product_ name= Registration Fee, i want to display Registration fee (taxes included)
And for each other case, the product name directly

I have set that:
 <tr class="item" th:unless="${product_name} == '' or ${#strings.isEmpty(product_name)}">
            <td>
				<span th:if="${product_name} != 'PER_TRIP_WAIVER' ? ${product_name}:'Insuranve waiver (taxes included)'"> </span>
				<span th:if="${product_name} != 'Registration Fee' ? ${product_name}:'Registration fee (taxes included)'"> </span>
				<span th:unless="${product_name} != 'Registration Fee' ? ${product_name}:'Registration fee (taxes included)'"> </span>
            </td>
            <td class="price" style="text-align:right">
                <span th:text="${product_with_tax}"> </span> €
            </td>
        </tr>

And it didn't work.

I have also tried with th:switch and it didn't work too. :/
Or i don't do it correctly.

Could you please help me?

Thanks