# Comments at start of Dashboard 2.0 ui-template

**URL:** <https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [22 February 2024 14:01 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775 "2024-02-22T14:01:47Z")\
**Posts on this page:** 10\
**Page:** 1

<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:** [22 February 2024 14:01 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/1 "2024-02-22T14:01:47Z")

</div>

I want to add a comments header section at the start of a D2 ui-template (not inside `<template>` or `<script>`. This seems to work  
`<!-- this is a comment -->`  
Is that the recommended way?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [22 February 2024 14:18 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/2 "2024-02-22T14:18:18Z")

</div>

This is valid. You of course can't see this on the page source cos vue cleans those out.

---

<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:** [22 February 2024 17:27 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/3 "2024-02-22T17:27:55Z")

</div>

Great, thanks.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 February 2024 17:46 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/4 "2024-02-22T17:46:27Z")

</div>

and if you DO want to see your comments (as regular text not inside `<!-- xxx -->`) in the rendered vue source, you can put your comments in a span or div or similar and set `v-show="false"` (v-if wont add it to the DOM, v-show will but instead, set the display style to none)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [22 February 2024 18:02 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/5 "2024-02-22T18:02:07Z")

</div>

> [@Steve-Mcl](#):
>
> and if you DO want...

... think twice and then think twice.

---

<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:** [22 February 2024 20:14 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/6 "2024-02-22T20:14:36Z")

</div>

No, I don't want it in the rendered source, it is just to document what the template does, so only needed in the editor.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 February 2024 20:17 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/7 "2024-02-22T20:17:45Z")

</div>

Just offering it up for anyone passing by. I find it useful when digging into the weeds and need _something to find_ in the source

And in the same vein, every node has a description editor that gets rendered in the info tab and can support markdown formatting including the extended node doc styles listed in [Node help style guide : Node-RED](https://nodered.org/docs/creating-nodes/help-style-guide)

---

<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:** [22 February 2024 20:50 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/8 "2024-02-22T20:50:33Z")

</div>

> [@Steve-Mcl](#):
>
> every node has a description editor that gets rendered in the info tab

Yes, but for code and similar stuff I much prefer embedded comments.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 February 2024 21:17 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/9 "2024-02-22T21:17:04Z")

</div>

True dat.

---

<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:** [23 March 2024 21:17 UTC](https://discourse.nodered.org/t/comments-at-start-of-dashboard-2-0-ui-template/85775/10 "2024-03-23T21:17:42Z")

</div>

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