Personal tools
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Resource parameters

The parameters for a registry entry in the CSS (and Javascript) registry.

Geir Baekholt

Plone has two neat tools for managing Cascading Stylesheets and Javascript in a handy way. This tutorial explains some whys and hows and even has a minimal practical example of how it works.
Page 4 of 5.

When working with CSS in the CSS Registry, each stylesheet has some parameters that can be tweaked.

id
The Zope id of the stylesheet to be used.
expression
A CMF expression to be evaluated to check if the stylesheet should be included in output or not.
media
The media for which the stylesheet 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 stylesheets. 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!
 
by Geir Baekholt last modified January 1, 2007 - 22:45 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by