Template Engine Support For Wappler

Hello @George,

What do you think about template engine support in wappler ?
Maybe you can add Smarty or another compatible template engine system .

Sure why not - I was actually thinking more about the Twig template engine.

https://twig.symfony.com/

Could be useful indeed for making all kind of server side templates. Like for mailing

3 Likes

Template, template yes!!! And Multilang support somewhere

1 Like

Hmmm but how would it complicate up the whole usage of wappler? I mean I started now with my project and when using includes over includes I thinkā€¦ wtf Iā€˜m doing with that kinda workaround. But hey, its working and its robust and simple. But how yould you implement that twig engine? I know Craft CMS uses twig and many moreā€¦

together with a route system this would be incredible please @George :smiling_face_with_three_hearts:

1 Like

Personally I think that a full blown template like TWIG or SMARTY is going to be an overkill. We already have a detached server side module and the only reason to have a PHP extension for our pages is when we use PHP code (like SSIā€™s) in our documents.

I may be putting myself off-side here, but my thoughts are far more simplistic. I have been using the Dreamweaver Template system combined with Framework Builder very successfully in the past (pre Wappler).

My idea is to be able to create a template of a page into which we only need to add the content.

To illustrate what I am doing at the moment, I have this template which I load into Wappler and rename as my page (e.g. index.php). I then add the content.

The template saves me having to remember to include all the bits and pieces that I require for my documents.

The problem that I have is when I need to modify the template. I make the change(s) in the template, but I also need to go to each of my web pages to make the same change(s).

Wouldnā€™t be great if we could create a site template and when we add a new page, we are asked if we want a blank page or use the site template. Wouldnā€™t it be great that when we make a change to the template, the change would automatically filter through to our child documents.

Just a thought. When replying, please remember that I am a frail geriatric. :wink:

5 Likes

Somehow Ben you are talking about some simple templating system apart from the include feature, I am not expert at this but I installed many CMS and the one I loved the most are the one with ā€œCreate new page with a templateā€ feature, I can prebuilt a page for some type of content and choose that template where neededā€¦even site admin wit no skill can create a page from a templateā€¦having that built into Wappler would be great indeed :slight_smile:

3 Likes

@ben this is what I have started to do. I agree, my most frustrating part about it is that if I decide to make a small alteration to the template, I have to go back though all the pages I have created to make that change, as well as the template itself.

It would be great to have a ā€œCreate new page with a templateā€ feature as mentioned by @Webjack357.

@George & Co., over to you guys :smile:

3 Likes

All this would be easy with routes.
Iā€™m talking about routes, not url friendly.

1 Like

@George

1 Like

I think that support for Twig and Markdown would make Wappler a strong contender versus flat-file CMS, static site generators and even other IDEā€™s such as Atom etc.
To really contend, Wappler does need to support a templating system such as Pinegrowā€™s or for that matter, InDesignā€™s, master pages. That would be truly useful, even though it is possible to set something similar up with Server Connect and Server Side Includes.

Sometimes I just need to make a speedy static website in a hurry. If said website does not need any other dynamic elements than a contact form and maybe newsletter signup, it would be a shame to slow it down with a database, even if it grows to include alot of pages. Also, free hosting, such as github or Amazon S3, is a pretty good selling point to some clients. They might even be persuaded to write posts in software that supports markdown, such as IA writer, Ulysses, even Atom.

I realize that Wappler might be competing with itself by implementing template systems, but it could attract a large customer segment (such as JAMstack fanbois) - as well as increase productivity for those of us that find PHP, Javascript and SQL a bit clunky to work with. In my view, Wappler is a productivity tool, and should strive to include all manners of modern shortcuts toward that end - even if it means catering a bit to lazy developers :wink:

4 Likes

I agree with you PurVies

ā€œSometimes I just need to make a speedy static website in a hurry. If said website does not need any other dynamic elements than a contact form and maybe newsletter signup, it would be a shame to slow it down with a database, even if it grows to include alot of pages.ā€

1 Like

Hey guys , We need more votes for high priority !
Maybe can help @wappler_ambassadors

3 Likes

You are right s.alpaslan it is about time we get some kinf of templating included wth Wappler, and not just one for dynamic website (twig, smarty etc.) but also, as ben mentionned earlier: ā€¦ā€œf we could create a site template and when we add a new page, we are asked if we want a blank page or use the site template. Wouldnā€™t it be great that when we make a change to the template, the change would automatically filter through to our child documents.ā€
And I would add tho that: ā€¦If we could start a new project with the possibility to select a template we already created?
I actually use DW only when I have to modify an old project but I do really miss that template systĆØme that I used a lot!

2 Likes

I really donā€™t see what can be accomplished with templates that canā€™t already be done with SPA sites or includes?

Well it depends on what type of project you are developping and what type of content, so to you it may look unsusful but for me and others who are more design oriented (and statics sites) first, it is very useful!
Iā€™ll give you a real example: I built a website for a client (RV Location) and on some pages the client wanted the same important message just before the main content on some pages.
So I did use the ā€œincludeā€ feature so I only have to do the message one and include in each page where needed and when we need to modify the message (Yearly) I only do it once on the included file.Thatā€™s cool.
BUT!! Just before I launch the site he changed is mind and asked me to put that message right before the contact section. SO, guess what? I had to open each page where the message appear in order to change de modify the position of the message (include file). That is where a template would come handy: You only change the template page and all the ā€œchild pagesā€, as will reflect that change. Simple and fast.

And this could be even useful for dynimic project too, This is why many of CMS out there do have some templating (or Master pages) for different layouts/content to use, either you as the dev or the client that can create pages himself form already made template pages/layout,I did it for some clients few years ago :slight_smile:

Again, as Ben mentionned: ā€œWouldnā€™t it be great that when we make a change to the template, the change would automatically filter through to our child documentsā€.

1 Like

The Wappler has many features and is very powerful despite being 1 year old. The template engine feature, combined with other features of wappler, will give us another serious feature. When requesting the feature, I often think of all the features and other features that other users may need for their needs.

Wappler is developing with demands from us and we need to direct these demands correctly.

I donā€™t know if you noticed ā€¦ Many users are learning a lot of new things thanks to wappler. One of these could be the template engine.

it was really necessary for us and would provide much convenience.

1 Like

Some kind of template would be nice

Not having so many lines of code

@George , @patrick