Setting up CSS compression

There are two things needed to get css compression running for the
current 1.2 beta that are not mentioned in the documentation. I post
it here to get some feedback before posting it as a documentation
ticket.

1.
In app/config/core.php locate
define('COMPRESS_CSS', false);
and replace with
Configure::write('Asset.filter.css', 'css.php');

The config variable is still the old one but cake makes use of the
newer directive. This line can be commented out to get back to
ordinary straight css output.

2.
Download the file csspp.php and put it in vendors/csspp/
This file used to be part of CSSTidy but it looks like the current
version has been rewritten somewhat. I found a version of the file on
trac and this should do fine since it is probably the version being
used by the cake-team.

https://trac.cakephp.org/browser/vendor/csspp/csspp.php

You may also dig around in the csstidy repo for an old version (v0.96
is on trac)
http://csstidy.sourceforge.net/


The result is that all css-tags start pointing to /ccss/filename.css.
After refreshing your browser you should not see your css file(s)
cached in app/tmp/cache/css/

Oh, and one mofe thing: Controller::cssTag() which is mentioned in the
docs does not exist. This should probably a reference to the method
HtmlHelper::css()



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to