I am attempting to replicate a rather simple example from this question here
<div <% if (page_name === 'overview') { %> class="menu__menu-overviewPage menu" <% } %> class="menu">
However, when I try it on any page other than overview, I encounter an error stating that page_name is not defined
I find it puzzling how in most programming scenarios, if/else statements can handle undefined or undeclared variables, except in ejs. How can I work around this issue?