NodeJS show/hide dynamic attribute

I’m trying to copy my previously created php project to a new nodejs project and I am experiencing some issues with being able to show/hide elements on my nav bar based on whether or not a user is logged in or not.

In my prior php project, I could create a server connect and then set a condition if the result hasitems in the show/hide dynamic attributes. In nodejs, there is no option for that.

I have gone through various options and can not seem to find anything that would work to show and hide an element based on whether or not the user is logged in.

Does nodejs have a similar to hasitems ?

Community Page
Last updated: