Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Minify Smarty Files

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
PierceMcGeough
Smarty n00b


Joined: 10 Jan 2014
Posts: 3

PostPosted: Fri Mar 28, 2014 1:00 pm    Post subject: Minify Smarty Files Reply with quote

I was wondering if there was a tool that would minify the Smarty templates

I have looked for GruntJS tasks but so far have found nothing.
Back to top
View user's profile Send private message Send e-mail
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5067
Location: Hamburg / Germany

PostPosted: Sun Mar 30, 2014 12:16 pm    Post subject: Reply with quote

Please note that the compiled templates and cache files are PHP files.
So whatever you want to do needs to be implemented as Smarty output filter. In the plugins folder there is the trimwhitespace filter which you can activate by
$smarty->loadFilter('output', 'trimwhitespace');
See http://www.smarty.net/docs/en/api.load.filter.tpl
http://www.smarty.net/docs/en/advanced.features.outputfilters.tpl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins 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