PHP Template Builder

Is the PHP template builder function finished? I read about it in posts from 2 years ago. Is there any way to create a PHP template so that if you need to make a change in one part, it will be reflected in all parts where that part is rendered?

Regards.

You can use PHP includes for that.

Is any plan to do a template system in the future for PHP?

If you are asking about templating like in NodeJS server model, we don’t currently have any plans for this.

What would a template system solve that PHP includes doesn’t?

Have you tried the Webassist Framework Builder? You can find it at http://www.webassist.com/dreamweaver-extensions/framework-builder.

With this tool, you can create partials to insert into new pages (plugins). You can also create a layout that can serve as a base for other pages, and when you update the layout, all the child pages are automatically updated. You can also create conditionals to insert plugins or apply themes when the page loads, and you can even change them based on certain conditions.

Another useful feature is the ability to load content via AJAX, which can greatly improve the performance of your website.

One of the biggest advantages of using the Framework Builder is that you don’t need to worry about the paths for images or resources because everything is merged into the final file. While this might seem like a simple PHP include, I can assure you that after using it for my first project, it made a total difference in my workflow and saved me a lot of time and effort.

Hi Juan,

I have used the WebAssist Framework Builder and found it to be one of the best tools in my arsenal.

Problem is that the tool is based on Dreamweaver’s Templating System, which in itself is a remnant of the Macromedia days. In other words, it is a proprietory system unique to Dreamweaver only.

If you want to stay with PHP and have a sort of templating system, then you can use PHP includes (SSI). If you do not use PHP and have your webpages as standard HTML, then you can implement a JavaScript alternative.

Having said the above, I have moved to NodeJS because of its unique templating system. In doing so, I have found other advantages in using Node that are not available for PHP.

Ben

It’s been about 20 years since I used WA Extensions. I didn’t know they were still around. Glad they are still supporting Dreamweaver.

I used WebAssist then moved to InterAKT then was with DMX Zone for many years before moving to Wappler on day one of Wappler pre-release. Haven’t touched Dreamweaver since so I don’t remember much of that work flow.

But from what I saw on the link you provided it can be done in Wappler with a combination of SPA (Single Page App) pages and Includes.

Are you stuck on PHP? You may find even better options with Node.js? I don’t use Node myself yet as affordable hosting just isn’t available. It’s worth a look though.

Have you seen

Hi Ben,

Yes, I have seen it. I’m still a fan of the old FTP upload system. Not a fan of the GitHub publishing yet mostly because I don’t know enough about it. Also Railway doesn’t seem to support databases?

I’m also not a fan of Wappler’s database manager. I prefer to use Navicat to build my tables and edit data.

But I was thinking on trying a Railway host just to play around with Node. I wouldn’t use it for any production projects. What about using your own domain name and subdomains?

See

This is the answer I get from Bing Chat

1 Like

Interesting, I hadn’t seen that video.

I wonder if using the Railway credentials will allow me to connect with Navicat? If so, I may have to give this a more serious look.

Thanks for your great videos, Ben! :beers:

1 Like

Ok, I set up a MySQL database with Railway for the sole purpose of seeing if I can administer it with Navicat. Happy to say that it works wonderfully.

Sad thing is, all I have on my account is a database with no tables or data and I ran out of services and was locked in just 9 days. No traffic at all. Only connected to it with Navicat once. Just imagine if I actually had a site! Pretty scary.

Sorry for taking this thread off topic :wink:

Sorry to hear that. The application is free to use up to $ 5:00 per month.

In my case where I have a simple MySQL database with about 15 viewings per day, the total cost to me is about $ 0.80 per month.

One way to minimise the cost is to use a SQLite databse which does not require a separate server. This would bring the cost down to $ 0.00 per month.