Enonic version: 7.2.0
OS: Ubuntu 18.04
I thought the display-name-expression was supporting ES6 template literals, but I tried the following expression (which is valid and is working on other ES6 plataforms, like web browsers):
${shortTitle ? shortTitle : title}
It is not working at all, leaving an empty displayName
You can test it on you web browser console:
let shortTitle = ''; let title = 'thisIsTitle'; `${shortTitle ? shortTitle : title}`
the output will be: "thisIsTitle"
β EDIT β
@SOLVED
After many tests and debugging of enonic frontend source code, I found that this expression works for my needs:
${``${shortTitle}` ? `${shortTitle}` : `${title}`}