# Link node/link in node/link out node

**URL:** <https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662>\
**Category:** Dashboard\
**Created:** [20 January 2020 23:52 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662 "2020-01-20T23:52:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tanya](https://discourse.nodered.org/u/tanya)\
**Post date:** [20 January 2020 23:52 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/1 "2020-01-20T23:52:32Z")

</div>

where can i find link node code?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 January 2020 23:53 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/2 "2020-01-20T23:53:54Z")

</div>

Hi @tanya

[https://github.com/node-red/node-red/tree/master/packages/node\_modules/%40node-red/nodes/core/common](https://github.com/node-red/node-red/tree/master/packages/node_modules/%40node-red/nodes/core/common)

---

<div class="post-metadata">

**Author:** ![tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tanya](https://discourse.nodered.org/u/tanya)\
**Post date:** [21 January 2020 00:00 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/3 "2020-01-21T00:00:43Z")

</div>

Thanks Knolleary

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [21 January 2020 01:02 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/4 "2020-01-21T01:02:58Z")

</div>

Can I ask what in particular you are interested in seeing about them?

---

<div class="post-metadata">

**Author:** ![tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tanya](https://discourse.nodered.org/u/tanya)\
**Post date:** [24 January 2020 18:42 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/5 "2020-01-24T18:42:47Z")

</div>

i just need similar kind of UI for my customized node

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 January 2020 19:07 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/6 "2020-01-24T19:07:44Z")

</div>

Is there some missing functionality that may make sense in the existing nodes ?

---

<div class="post-metadata">

**Author:** ![tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tanya](https://discourse.nodered.org/u/tanya)\
**Post date:** [27 January 2020 00:53 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/7 "2020-01-27T00:53:31Z")

</div>

nothing such. it looks perfect ow it is as of now

---

<div class="post-metadata">

**Author:** ![pitus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pitus/32/28170_2.png) [@pitus](https://discourse.nodered.org/u/pitus)\
**Post date:** [18 September 2020 21:14 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/8 "2020-09-18T21:14:35Z")

</div>

I'm building a lot of custom nodes for a complex flow/functionality and I need to internally (not using wires) link between some nodes based on their name or other property...  
To do that, I'm internally adding .links property to OUT nodes and they notify my IN node by sending a message to all IDs in .links  
There's a problem with that - my IN node can add (onadd), update (oneditsave), delete (ondelete) however there's no way to handle an UNDO, which completely messes up the links.  
Also, I'd like to have a visual feedback as to which nodes are connected to which other nodes internally, similar to how link-in and link-out show it when selected in the flow.  
I've tried to find out how this is done in the link-in/link-out pair but ... it seems that all of that functionality is hard-coded for these two nodes all over the dashboard ☹

What I'd like to be able to do in custom nodes is somehow inherit them from link-in and link-out nodes to get the same linking functionality (or similar - I'd like to control the editor UI, but the rest can be as is for link-in/link-out) ... This would be extremely useful for node authors.

Here's an example - I have several types of OUT nodes and then I have consumers (IN nodes) where I can select the Type first and based on the type it lists all OUT nodes of that type for me to choose (one or more) to link from... This simplifies the selection process by grouping OUT links by type not by Flow.  
For that same reason, I wanted the IN note to be able to change its background color based on the selected OUT source node (the oneditsave would determine, at the design time, what that color should be) - but that doesn't seem to be possible yet (I hope it will be considered).

I could use the link-in and link-out nodes for that, but then there's a mess with way too many extra link nodes having the same names as my custom nodes and ... I need to show the status under each OUT node showing its 'current value' (based on the last seen message)...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 September 2020 23:18 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/9 "2020-09-18T23:18:39Z")

</div>

Best to keep this to 1 thread I think. Closing this one for now - let me know if it needs reopening.

> [@Custom nodes to inherit linking from link-in, link-out nodes](https://discourse.nodered.org/t/custom-nodes-to-inherit-linking-from-link-in-link-out-nodes/33061):
>
> I'd like to be able to add virtual wires between my own custom nodes and have them behave similar to how link-in / link-out pair does it - shows the normally invisible port with a dashed wire when selected, possibly with many wires leading to other tabs, maintain the linkage even on cut/copy/paste/undo, handle message passing between ... the only customization would be the UI editor so that my custom node can decide the list of selectable source/target nodes based on custom criteria (such as the…

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 September 2020 23:18 UTC](https://discourse.nodered.org/t/link-node-link-in-node-link-out-node/20662/10 "2020-09-18T23:18:48Z")

</div>


