|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
carpii Smarty Rookie
Joined: 06 Sep 2008 Posts: 18
|
Posted: Tue May 03, 2016 2:20 am Post subject: Using a modern build stack with Smarty |
|
|
I love Smarty, and have used it for years. I intend to carry on using it too, because I love its performance and relatively simple architecture
But all my smarty templates are handcoded HTML
They are starting to become long in the tooth, and a little difficult to maintain (especially in the mobile era)
I would love to incorporate more modern tools into my build chain, CSS preprocessors like SASS and perhaps some HAML-based HTML preprocessors which could run and output Smarty templates.
I wonder if anyone is already using a similar workflow with Smarty? |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
Posted: Tue May 03, 2016 8:11 pm Post subject: Re: Using a modern build stack with Smarty |
|
|
carpii wrote: |
But all my smarty templates are handcoded HTML
They are starting to become long in the tooth, and a little difficult to maintain (especially in the mobile era)
I would love to incorporate more modern tools into my build chain, CSS preprocessors like SASS and perhaps some HAML-based HTML preprocessors which could run and output Smarty templates.
|
Answer is simple ... use a Smarty related CMS - for instance [url=http://www.cmsmadesimple.org ]CMS Made Simple[/url]. Has a css preprocessor module too. |
|
Back to top |
|
carpii Smarty Rookie
Joined: 06 Sep 2008 Posts: 18
|
Posted: Fri May 06, 2016 9:27 am Post subject: Re: Using a modern build stack with Smarty |
|
|
Humm, thats not really a solution
Maybe if it were a simple blog site, I could swap it for a CMS, but its a large social site with many features and a mature codebase |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri May 06, 2016 2:29 pm Post subject: |
|
|
Mature or aged?
If the code base is okay, it should be relatively simple to convert it to use templating engine. |
|
Back to top |
|
carpii Smarty Rookie
Joined: 06 Sep 2008 Posts: 18
|
Posted: Sun May 08, 2016 5:00 am Post subject: |
|
|
AnrDaemon wrote: | Mature or aged?
|
Truthfully? A bit of both I guess
the PHP code is actively maintained, but some of my smarty templates are quite legacy (HTML 4.01, some use nested tables for layout etc)
Quote: |
If the code base is okay, it should be relatively simple to convert it to use templating engine. |
This site already uses Smarty
What I'd like is some modern tools I can integrate, so instead of a directory of smart templates, I've a directory of HAML, SASS, coffeescript or whatever
And then I run these preprocessor tools over those scripts, to output my actual Smarty templates
Most these tools will just choke on the smarty $variables and {tags}, because they know nothing about Smarty, and so this is the issue I have. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon May 09, 2016 2:59 pm Post subject: |
|
|
If your "modern" stack chokes on string literals, you probably need a better stack. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|