This is a piece of my freemarker template:
${order.needByDate?if_exists?date}
I want it to work as following:
- if
needByDate
is null, then write nothing - if it is not null, then write the date part
The above works only in second scenario. What is the correct way to achieve this?