Content Display Name Script

Hi guys!
Enonic XP does have any way of getting the displayName based on a related content and not only internal (the content itself) values?

If you are thinking about the content studio editor, no, but maybe at some point in the future. When creating through api it is up to you .

I could do it using main.js. Checking if the content has the related one and on “create” and “update” events for the chosen content-type I update the displayName property. It’s working ¯_(ツ)_/¯

Indeed, that might be good enough I guess? :slight_smile: I was thinking about instant feedback in the UI

1 Like

Instant update would be nice, but for now that way is working well, since we don’t need to publish the updated nodes.
Here’s my main.js:

1 Like