Reputation: 107
I have this code:
[#list doc.presidents as president][#if president.name?has_content]${president.name}[/#if][/#list]
When I run it, I have the error: Expression president is undefined
.
What am I doing wrong?
Thanks!
Upvotes: 1
Views: 1586
Reputation: 31112
I suppose you have a null
in that presidents
list.
As of the nested content of #list
, it could be just written as ${president.name!}
. If you expect the president
itself to be null
, then ${(president.name)!}
.
Upvotes: 2