3.9.9 - Navbar unable to find the views when a main layout is used

I’m unable to set up the Navbar when I use a “main” layout for a simple site example:

Link to GitHub repository of my site: Broken site with a “main” layout

It loads okay initially:

But pressing the links breaks it:

Any help would be greatly appreciated.
–Ralf

<div class="navbar-nav">
          <a class="nav-item nav-link active" href="../views/index.ejs">Home</a>
          <a class="nav-item nav-link active" href="../views/About.ejs">About</a>
          <a class="nav-item nav-link active" href="../views/Contact.ejs" internal>Contact</a>
        </div>

The linking here is incorrect. Pages in NodeJS are always accessed via their route. This sort of path does not work here.

In the Wappler UI, where you see the link part, click on the “shuffle” icon. That will open up the routes on your app, and select the appropriate one there.

1 Like