5 ms·
PHP is a whole lot more than just a templating engine. I think you would find that much more effort than is required just to make some templates.
by improv32 9y ago
PHP is a whole lot more than just a templating engine. I think you would find that much more effort than is required just to make some templates.
- DenisM 9y agoPerhaps you can send me down the righ path? I want my users to be able to send emails from their iPads, and those emails would be generated based on templates. There will be many such templates built in, and eventually users will be able to hire web developer-type person to make custom templates. My thinking was that PHP is the most popular language for that sort of thing, so it would be nice if could support that. My second choice is handlebars. I'm not sure if JSX would do the job? Any thoughts appreciated.
- jawngee 9y agohttps://github.com/groue/GRMustache https://github.com/groue/GRMustache https://github.com/groue/GRMustache.swift https://github.com/groue/GRMustache.swift
- jwdunne 9y agoIf solely for templating emails, I would go with handlebars. You could use PHP but then you have a whole host of other stuff that you don't want or need in a templating language.
- my_ghola 9y agoPHP is not a templating language. You can build a template engine with it, but then, you can build one with any other language. If your app is in swift or objective-c, look into template libraries for those languages. Simple Google search tells me there's a couple of options including one using handlebar's format.
- DenisM 9y agoHow is this not a template? It generates valId HTML out of data. <?php for ($x = 0; $x <= 10; $x++) { echo "The number is: $x <br>"; } ?>
- fdsfsda7fsda 9y agohttps://twig.sensiolabs.org/ https://twig.sensiolabs.org/
- bencoder 9y agoI don't think there are implementations of twig outside of PHP, so this isn't useful for the op
- fdsfsda7fsda 9y agothere is I use JTwig with Java + Spring all time same syntax
- LinuxFreedom 9y agohttps://laravel-news.com/laravel-markdown-emails https://laravel-news.com/laravel-markdown-emails
- nathan_f77 9y agoIf you just need formatting without logic, then you could use something like Markdown. Someone else already mentioned GRMustache [1], and that looks pretty good. I'm not sure if there is an iOS version, but you could look for something like liquid [2]. I think liquid is usually a better choice for user-controlled templates, especially when you're rendering on a server. But if they're just compiling the templates on their own device, then handlebars (GRMustache) would be the right way to go. [1] https://github.com/groue/GRMustache https://github.com/groue/GRMustache [2] https://github.com/Shopify/liquid https://github.com/Shopify/liquid
- krick 9y agoI actually assumed this is a joke/trolling attempt, since it was a common joke to despisingly call PHP a "templating engine" a few years ago. But the follow-up seems so sincere that I don't even know what to think anymore...