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

Minify Smarty Files

 
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 -> 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: 5068
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:   
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 -> 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