Creating template based pages and layout in Wappler with NodeJS

How do we convert existing html pages to .ejs pages without losing any of the required dependencies / files e.g. css and dmx references?

What actually is included in this current beta function I don’t want to be wasting my time trying to figure why something is not working or submitting bug reports if the functionality is not supported in this version? What is incomplete and just wont work?

Hi @George, do you know already if it will support nested data?

I’ve found the beta very interesting because it is allowing me to take a deeper look at how Wappler has designed the solution and will most probably give me an edge in the future. It also has allowed me to make the right questions and provide interesting feedback. But it does require time, constant rebuilding and researching. Time that if you don’t want to spend I would just recommend you to wait for the final version.

4 Likes

If you have static html files, just move them to the views folder and rename it to .ejs. If you use the same folder structure as in the public folder then it should work directly and all dependencies also. You will need to create routes for them to make them reachable.

1 Like

6 posts were split to a new topic: Firebase hosting and NodeJS

With an index.ejs file already created, the layout view didn’t attach to the index content page.
If anyone has the same problem, I did this to fix it:

-Go to the routing panel
image
-Delete the existing root path
image
-Add a new route set to the same “/” with the same properties
image

Do you have some temporary work around for this?

What’s your use case?

I would like to create a mostly single page app with dynamic meta attributes.

Here you are. It is explained here.

2 Likes

Is it not possible to add partials inside of a layout page?

Use case?

A partial is normally a piece of code that you are planning on reusing throughout your app, but is not common to all your app.

But adding a partial to a layout makes it available to all the pages that use that layout. Are you planning on using several layout files where some will have a partial and others won’t?

Are you planning on using several layout files where some will have a partial and others won’t?

Something like that yes, im still really having a hard time understanding layouts, routing etc.

My goal is to have a single page type app with no refreshing on navigation.

app.com/ this would be the main page left empty
then I will have some pages like app.com/settings for logged in users.
And I would like dynamic page for profiles. app.com/{profileid}

In bubble have one main page “/id” then I use collapse/hide conditions for all the sub/fake pages displayed by the url paths. I find building with bubble much more intuitive then here sadly.

If you disregard the PWA bit, this may be of help:

1 Like

SPA for node with the template system is not available yet.

1 Like

On the other side, SPAs were used a lot in Bubble to make the app look quicker. I only used SPAs in Bubble for that reason.

You won’t necessary need that if you redo your app with Wappler stack and deploy to a fast server.

So make sure you take a good look at pros and cons of SPAs and MPAs before you take a decision based on a bad experience with Bubble :slight_smile:

2 Likes

SPA with NodeJS is now available

1 Like

This is great! Been waiting for something like this. Trying to get Admin pages that don’t reload the whole page has been a pain.
Thank you.

2 Likes

Hi guys,

Great board, congrats.

I have created a layout page called main, but at the bottom of the screen I get the message:

“Failed to load the resource: the server responded with a status of 404”.

Also, if I create a content page, the components of the layout page don’t appear.
A system check gives me a “Docker Desktop is correctly installed”, and if I update and redeploy all service I get the message “All Services launched!”.
Please advise what I may be doing wrong.

Best.

Jay

Any update for PHP?