Use the same ui-template node multiple times

I am using the same template node multiple times (copies). Let's say I want to change something in the template code. That means, I have to do the same change in all template nodes. Is there a way to avoid this? For example, is it possible to add a master template and then the copies would always inherit the code from the master?

EDIT: Or maybe feed the template code from a previous inject node?

If you read the help text you can leave the template node blank and feed in msg.template

I tried but I seem to do something wrong.

msg.template is not supported for DB2.

Well it's mentioned here :nerd_face:
Nevermind, maybe a misunderstanding. Thank you anyway!

My bad did not read the category correctly, I have not looked into this as yet.
Can you link a JS file? <link>: The External Resource Link element - HTML: HyperText Markup Language | MDN . Then you could possibly link a file between script tags

Does Dashboard 2 play well with subflows, if so you could add it to a subflow, then you only need to maintain the subflow.

It's not supported yet is the key here. Have opened an issue as you're one of a few that have asked for this in the past week or two: Enable dynamic ui-template content with injection of msg.template · Issue #561 · FlowFuse/node-red-dashboard · GitHub

1 Like

Thanks! It came up where? On git? Sorry, I searched only this forum.

I can't recall exactly where, but definitely crossed my path a few times. No need to apologise! All feedback and ideas are welcome!