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.
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.