Yep, that's pretty neat.

From: Jonathan Shaw <notifications@github.com<mailto:notifications@github.com>>
Reply-To: nla/banjo <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Tuesday, 18 February 2014 2:50 PM
To: nla/banjo <banjo@noreply.github.com<mailto:banjo@noreply.github.com>>
Cc: Shuang Zhou <szhou@nla.gov.au<mailto:szhou@nla.gov.au>>
Subject: Re: [banjo] catered for dcmDateTimeCreated and dcmDateTimeUpdated. (#370)


In web/WEB-INF/views/works/copies/show.ftl:

> @@ -53,9 +53,22 @@
>                  [#if work.dcmCopyPid??]
>                    <hr />
>                    <h4>DCM Legacy Data</h4>
> +
> +                  [#if work.dcmDateTimeCreated??]


FreeMarker has a nifty way of doing this. You can use ! after the variable and then provide a default value. For example in this instance you can replace this whole section with
${(work.dcmDateTimeCreated!"")?string("dd/MM/yyyy")}

—
Reply to this email directly or view it on GitHub<https://github.com/nla/banjo/pull/370/files#r9811890>.