Resource Parameters
Each entry in the CSS and JavaScript registries has some parameters that can be tweaked.
- id
- The id of the style sheet or JavaScript to be used. In Plone 3.3 onwards you can specify an externally hosted resource by entering the full URL here.
- expression
- A TALES expression to be evaluated to check if the style sheet or JavaScript should be included in output or not. You can use global template variables here.
- conditionalcomment (available from Plone version 3.3 onwards)
-
A small string to be included in a conditional comment around the resource. For example, entering simply 'IE' in the field will
result in a conditional comment of:
<!--[if IE]>...<![endif]--
This behavior is currently enabled for the CSS and JavaScript registries. The KSS registry is the only registry that does not have full support for conditional comments. For more information see: http://msdn.microsoft.com/en-us/library/ms537512.aspx - media
- The media for which the style sheet should apply, normally empty or 'all'. other possible values are 'screen', 'print' etc. Read more about the media settings of CSS at w3.org
- rel
- Link relation. defaults to 'stylesheet', and should almost always stay that way. For designating alternative style sheets. This is used for the toggle between large, medium and small fonts in default Plone. Don't change this one unless you know what you are doing.
- title
- the title of an alternate stylesheet.
- rendering
- How the stylesheet is linked from the html page. This is an
advanced setting. Leave it set to the default 'import' unless you know
the effects of different ways of rendering and linking stylesheets
- import
- the default. normal css import
- link
- works better for old browsers and is needed for alternate stylesheets
- inline
- render
the stylesheet inline instead of linking it externally. Shouldn't be
used at all! It isn't possible to create sites which validate if you do.
For more information see: http://developer.mozilla.org/en/docs/Properly_Using_CSS_and_JavaScript_in_XHTML_Documents
- compression
- Whether and how much the resource should be compressed
- none
- the original content will not be changed
- safe
- the content will be compressed in a way which should be safe for any workarounds for browser bugs. Conditional code for Internet Explorer is preserved since ResourceRegistries 1.2.3 and 1.3.1.
- full
- the content will be
compressed with some additional rules.For css all comments and most
newlines are removed, this may break special browser hacks, so use with
care. For JavaScript this encodes variables with special prefixes
according to the rules described here (Special Characters):
http://dean.edwards.name/packer/usage/ The source code needs to be written according to those rules, otherwise it's more than likely that it will break. - safe-encode
- - only available for JavaScript
- 'full-encode' - only available for JavaScript. Additionally encodes keywords. This heavily compresses the JavaScript, but it needs to be decoded on the fly in the browser on each load. Depending on the size of the scripts this could lead to timeouts in Firefox. Use with special care! - applyPrefix
- - only available for CSS.
- If your stylesheet uses relative URLs in aurl()statement, e.g. to refer to another stylesheet or image, you may experience problems when using the registry in non-debug-mode, as portal_css alters the URL seen by the browser. If so, set this option to True or tick the "Replace relative paths in url() statements with absolute paths?" option in the portal_css management screen to replace any relative path inside aurl()statement with an absolute path (prefixed with the Plone site root path) during the resource merging stage. This does not modify the original stylesheet. It may have a slight performance impact, but it should not be an issue if resources get cached properly. It has no effect in debug mode.

Author: