Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Using a modern build stack with Smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
carpii
Smarty Rookie


Joined: 06 Sep 2008
Posts: 18

PostPosted: Tue May 03, 2016 2:20 am    Post subject: Using a modern build stack with Smarty Reply with quote

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
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Tue May 03, 2016 8:11 pm    Post subject: Re: Using a modern build stack with Smarty Reply with quote

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 Wink - for instance [url=http://www.cmsmadesimple.org ]CMS Made Simple[/url]. Has a css preprocessor module too.
Back to top
View user's profile Send private message
carpii
Smarty Rookie


Joined: 06 Sep 2008
Posts: 18

PostPosted: Fri May 06, 2016 9:27 am    Post subject: Re: Using a modern build stack with Smarty Reply with quote

Humm, thats not really a solution Wink

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri May 06, 2016 2:29 pm    Post subject: Reply with quote

Mature or aged? Very Happy
If the code base is okay, it should be relatively simple to convert it to use templating engine.
Back to top
View user's profile Send private message
carpii
Smarty Rookie


Joined: 06 Sep 2008
Posts: 18

PostPosted: Sun May 08, 2016 5:00 am    Post subject: Reply with quote

AnrDaemon wrote:
Mature or aged? Very Happy


Truthfully? A bit of both I guess Very Happy
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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Mon May 09, 2016 2:59 pm    Post subject: Reply with quote

If your "modern" stack chokes on string literals, you probably need a better stack.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP