# Need gate node with 2 outputs

**URL:** <https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256>\
**Category:** General\
**Created:** [31 August 2020 14:59 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256 "2020-08-31T14:59:36Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [1 September 2020 10:42 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/21 "2020-09-01T10:42:30Z")

</div>

I think we all trying to steer you into not creating a fork of the gate node for something that can be accomplished with existing nodes in an acceptable manner 🙂

It's the Node-RED way of doing things 🙂

---

<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:** [1 September 2020 11:01 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/22 "2020-09-01T11:01:05Z")

</div>

... but as a learning exercise it is a perfectly valid thing to do... and not to be discouraged...

(just preferably don't publish it to npm - or if you do - remove the "node-red" tag from the package.json first)

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [2 September 2020 15:21 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/23 "2020-09-02T15:21:51Z")

</div>

> [@cymplecy](#):
>
> Obviously, not a long term sustainable solution

That's not so obvious to me. Can't I just copy the .node-red\node\_modules\node-red-contrib-simple-gate folder to another location and then do "npm install" on that directory after I've changed the code and title?

> [@dceejay](#):
>
> just preferably don't publish it to npm - or if you do - remove the "node-red" tag from the package.json first

Understood, but I plan on doing the above so it stays local.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [2 September 2020 16:25 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/24 "2020-09-02T16:25:13Z")

</div>

> [@LosinIt](#):
>
> That's not so obvious to me

I did this myself with one specific node I wanted to have some special features in. The author did not feel especially keen or comfortable about them but I really wanted them.

No problem to change the code if you are skilled enough. So I did, and kept an additional local copy of both the original and the hack. Proud and happy, working great, but...

First of all I was also eager to have & benefit from new version the author published. Now and forever. So instead of what you plan to do, I edited every new version and added my personal features. Every time a new version was released.

This is still possible to do but for me, this is _not_ my favorite interest. So best is if you can convince the author but I guess you have already tried. If unsuccessful you have no choice, just do it, it's also a good exercise as already mentioned

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [2 September 2020 16:32 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/25 "2020-09-02T16:32:38Z")

</div>

Thanks, I appreciate the encouragement. While I have no experience programming with JS I was an avid programmer in quite a few environments with many languages before I retired. That was over 10 years ago and I've done very little since so to say I'm rusty is an understatement. But I'm sure I can figure it out...eventually.

I'll search this community and the web for needed tidbits and post on this topic if I can't find what I need.

---

<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:** [2 September 2020 16:43 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/26 "2020-09-02T16:43:02Z")

</div>

It would be better to fork the original repository on github and start a branch on your fork, and make the changes there, installing to your system from your repository. Then if the original is updated you can bring your fork up to date and move your branch to the new head and if there are no conflicting changes it will continue to work.

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [2 September 2020 16:57 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/27 "2020-09-02T16:57:43Z")

</div>

Good point. But I don't lose anything if I do a local copy to get it working and then do as you say and cut&paste my changes to the cloned repo, right? I've never used github for other than installing packages from so I'll have to learn about that. I'm sure it's not hard but it is one more thing before knowing if I like what I come up with. And if not I won't need to know how to do the github thing yet. This old brain seems to have only so much storage and everything I push in pushes something else out. 😉 🙄

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [11 September 2020 15:46 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/28 "2020-09-11T15:46:59Z")

</div>

To wrap up this topic I'm pleased to report that I have a working gate with the 2 outputs. It took me until last night to get a round tuit but it only took about an hour. Rather than refer back to the guidance provided by @cymplecy I struck out on my own just for the satisfaction of the accomplishment. I wound up with what @cymplecy provided with his guidance plus a few other things (color, output labels, etc.) again for the learning.

Thanks to all here for your support and guidance.

---

<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:** [25 September 2020 15:47 UTC](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256/29 "2020-09-25T15:47:09Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/need-gate-node-with-2-outputs/32256.md?page=1)
