# Dashboard Template - reuse of switch or dropdown within a generic template

**URL:** <https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717>\
**Category:** Dashboard\
**Created:** [5 May 2024 11:18 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717 "2024-05-05T11:18:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lori](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lori/32/85597_2.png) [@lori](https://discourse.nodered.org/u/lori)\
**Post date:** [5 May 2024 11:18 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717/1 "2024-05-05T11:18:59Z")

</div>

Hello,

I have a question regarding the reusage of custom controls like switch or dropdown within a template node. I made some custom controls like a shutter control to change postion/slats (with dynamic icons dependending on the values). This looks like that:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/39abb4b6dcf4b25b94ed0a92c43b5fa10f560d7b.png)  
Therefor a have created several controls and put them together.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bc58ab66f458bc3da33fcf76eb5206d5769389ae.png)

In order to enable easy reuse, I want to convert this into a template node. Since I found now way to extend the in/out connections of a template node, I wonder if this is possible at all?

If not, I would only move the controls inside the template (_this allows me to save the template in the library and use it very easily_).

Is there an example of how to use a common dashboard control like switch or dropdown inside a template?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 May 2024 13:19 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717/2 "2024-05-08T13:19:10Z")

</div>

Are you talking about the older dashboard node-red-dashboard, or the very new Dashboard 2.0 @flowfuse/node-red-dashboard?

Either way, node-red 4.0 (currently available as a Beta version) should have the ability to include dashboard widgets in subflows. Perhaps that would better suit your requirements. It is basically working in the beta version (with the new dashboard at least), though there are still some issues.

---

<div class="post-metadata">

**Author:** ![RedTom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/redtom/32/88014_2.png) [@RedTom](https://discourse.nodered.org/u/RedTom)\
**Post date:** [9 May 2024 08:48 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717/3 "2024-05-09T08:48:32Z")

</div>

here an example of my shutter template ui for Dashboard 2,

user hotNipi made this nice control for me, see

> [@Dashboard 2 template vertical slider height](https://discourse.nodered.org/t/dashboard-2-template-vertical-slider-height/85233):
>
> Hi, I am new to html,css and javascript programming (only did some c- or c++ programming). I try to make some tests with an ui template that I want to use to control shutters. I want to reduce the height of the vertical slider, but activating the height settings in the css part does only reduce the size of the complete group, the slider inside is cut off. Maybe someone can help. slightly_smiling_face Thanks \<template\> \<v-container class="bg-surface-variant" \> \<v…

---

<div class="post-metadata">

**Author:** ![lori](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lori/32/85597_2.png) [@lori](https://discourse.nodered.org/u/lori)\
**Post date:** [10 May 2024 15:33 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717/4 "2024-05-10T15:33:56Z")

</div>

@Colin thanks for your reply. I am using node-red-dashboard, not the new flowfuse. (I might migrate to flowfuse but corrently I do not know of any advantage in my case).

Dashboard subflows sounds exactly like I am looking for. I can move central flows and instantiate them across multiple flows. When I want to change anythink, I only need to adjust this single subflow, not multiple instances of it.

---

<div class="post-metadata">

**Author:** ![lori](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lori/32/85597_2.png) [@lori](https://discourse.nodered.org/u/lori)\
**Post date:** [10 May 2024 15:35 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717/5 "2024-05-10T15:35:48Z")

</div>

@RedTom thanks for your post. Currently I am using the legacy dashboard, however this kind of control doesn't fit to the rest of my dashboard. Anyway thanks for pointing me to it!

---

<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 June 2024 15:36 UTC](https://discourse.nodered.org/t/dashboard-template-reuse-of-switch-or-dropdown-within-a-generic-template/87717/6 "2024-06-09T15:36:21Z")

</div>

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