I have the following freemarker template if statement:
<#if errorMap.[pageText.PART_NUMBER"_"i]??>
<#assign textClass="error">
</#if>
I am looking to check if that particular variable exists in the errorMap hashmap, but am getting the following error:
Exception created : freemarker.core.ParseException: Encountered “[” at line 37, column 73
I can’t seem to figure out how to build the call to retrieve that from the hashmap. I have also tried surrounding the variables inside the [] with ${}, but that didn’t work either. Is it even possible to build the call I am trying to make?
Thank you for your help.
Have you tried removing the
.aftererrorMap?