After the user is logged-in im my dashboard I want a template to be executed, which changes the color of a tab in the sidebar. My problem: I´ve been trying to achieve this behaviour by sending the style properties in msg.template to the node, but it doesnt do anything.
Here is what I was trying:
[
{
"id": "ab3cecbbaca469ea",
"type": "template",
"z": "57f319143e2d929c",
"name": "send empty",
"field": "template",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "",
"output": "str",
"x": 950,
"y": 540,
"wires": [
[
"79f2285a15c59faf"
]
]
},
{
"id": "5c9c5b17f4e3af94",
"type": "template",
"z": "57f319143e2d929c",
"name": "send template",
"field": "template",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<style> body.nr-dashboard-theme md-list-item._md-button-wrap:nth-child(1) > div:nth-child(1) > div:nth-child(2) { background-color:#32cd32; color: white; } </style>",
"output": "str",
"x": 960,
"y": 600,
"wires": [
[
"79f2285a15c59faf"
]
]
},
{
"id": "79f2285a15c59faf",
"type": "ui_template",
"z": "57f319143e2d929c",
"group": "7ce31291a1cf860d",
"name": "",
"order": 0,
"width": 0,
"height": 0,
"format": "",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "global",
"className": "",
"x": 1160,
"y": 560,
"wires": [
[]
]
},
{
"id": "7e4d3b1fa4c2078c",
"type": "inject",
"z": "57f319143e2d929c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 760,
"y": 600,
"wires": [
[
"5c9c5b17f4e3af94"
]
]
},
{
"id": "5fdd6d424d5a3bee",
"type": "inject",
"z": "57f319143e2d929c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 750,
"y": 540,
"wires": [
[
"ab3cecbbaca469ea"
]
]
},
{
"id": "7ce31291a1cf860d",
"type": "ui_group",
"name": "Das ist Gruppe 1",
"tab": "",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
}
]