CouchCMS Addon. Adds a new <cms:minify>-Tag to minify/compress the HTML Output.
- Download Add-On
- Extract directory
tiny-html-minifierin'couch/addons'folder. - Add the following entry in
'couch/addons/kfunctions.php'file
(if this file is not found, rename thekfunctions.example.phpfile tokfunctions.php)
require_once( K_COUCH_DIR.'addons/tiny-html-minifier/TinyMinify.php' );This addon makes available a new <cms:minify>-Tag. It is very simple to use:
<cms:minify>
<!-- here comes your HTML and CMS code :) -->
<p>Compression works:</p>
<ul>
<li>
Really?
</li>
<li>
Really!
</li>
</ul>
</cms:minify>Code will minified to:
<p>Compression works:</p> <ul> <li> Really? </li> <li> Really! </li> </ul> - collapse_whitespace
- disable_comments
Both parameter are boolean and can set to true or false (default is false):
<cms:minify collapse_whitespace="true" disable_comments="true"></cms:minify>PHP7+