# Payload inside style element

**URL:** <https://discourse.nodered.org/t/payload-inside-style-element/46964>\
**Category:** General\
**Created:** [10 June 2021 08:15 UTC](https://discourse.nodered.org/t/payload-inside-style-element/46964 "2021-06-10T08:15:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![watwat](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/watwat/32/43131_2.png) [@watwat](https://discourse.nodered.org/u/watwat)\
**Post date:** [10 June 2021 08:15 UTC](https://discourse.nodered.org/t/payload-inside-style-element/46964/1 "2021-06-10T08:15:12Z")

</div>

I am trying to have a color picker that sends a payload with color data, where the background of the whole dashboard should be changed on sent. The easiest way to do so what I've found, is to use a Template node that takes the payload and insert it into the style. However, I can't get that to work. I do not know if there is a better way for this or what could be wrong in the syntax?

Example:

`body.nr-dashboard-theme {
background: {{msg.payload}};
}
`

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [10 June 2021 10:34 UTC](https://discourse.nodered.org/t/payload-inside-style-element/46964/2 "2021-06-10T10:34:49Z")

</div>

if this is standard template node try {{payload}}, no need for msg.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 August 2021 10:35 UTC](https://discourse.nodered.org/t/payload-inside-style-element/46964/3 "2021-08-09T10:35:26Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
