Writing a skin in CPSDefault

Revision: $Id$


skin directories:

  |-- cps_default    all needed skin for CPSDefault
  |-- cps_devel      skin for benchmarking or debuging
  |-- cps_images     images only no icons
  `-- cps_styles     a plone_styles folder
      `-- nuxeo      a customization of the plone.css

skin order:

  1. (cps_devel)
  2. cps_styles/nuxeo
  3. cps_styles
  4. cps_images
  5. cps_default

1   File naming

We try to use the same file naming as CMF.

For any new file follow these rules:

  1. For a page template or a python script that return an HTML page:


    If the page is a form: object_action_form.p[ty].


    content_create.py       # use request and redirect to html page
  2. Python script:




    Note: It is very useful to make each python script work with a default value so that you can call them with a browser and you can bench mark it easily (cf. doc HOWTO.BENCHMARK).

  3. macro library:


2   Generic names

a folderish object
what is inside a folder
a list of objects
the cps proxy object
a cps document in the portal_repository
a dictionary of information about an object
a list of item that represent a path like physical path
a /string/like/this that resolve

3   Python Script

mandatory header:

# $Id$
""" A description of what the script does, param and return if
it is not obvious """

Do not use context.REQUEST in a python script! You should pass it through the parameter line. Examples:




4   Path and URL

Follow CPSCore/doc/virtual-hosting.txt documentation to see all the ways to get url/path information about an object that will not break using virtual hosting.

main_template defines:

5   SVN

Follow these guidelines:

The following section of the SVN manual is helpful: http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-3-sect-5.

6   Macros

We try to use macros for any thing that appears twice or that needs to be easily customized. Macros are defined in a *_lib.pt file, for example content_lib or generic_lib. You should provide a test suite for each library. These are located in cps_devel like test_content_lib or test_generic_lib. Each time you add a macro you should add a test.

7   About CSS

XXX deprecated

8   Customization

We should be able to make light customization by adding custom CSS. We should be able to make heavy customization by rewriting *_lib files and maybe main_template. The goal is to keep all other files unchanged.

9   Translation and caveats

See howto-i18n.txt|html for internationalization and translation rules.

A skin is finished only when it is fully i18n and l10n in en and fr!