Beacon24 / v0

4 stars 2 forks source link

Using ejs in navbar partial to link to current user profile page #15

Open Beacon24 opened 2 years ago

Beacon24 commented 2 years ago

I feel like this should be simple and I'm missing something. I want to create a link in the navbar.ejs partial (/views/partials/navbar.ejs) that takes the user to their own profile page, if they are logged in. I want it to just be a clickable ejs rendering of their name. This works for me in my index.ejs file, where a user can click a link to view the listed profile (show.ejs).

The problem seems to be, the navbar partial does not recognize my user variable. Screenshot from 2022-07-19 20-00-09