Local themes
Last modified:
05/20/2006 07:47 AM
| Revision: |
local-themes.txt 31277 2006-01-03 16:36:45Z dkuhlman |
Local theme names are obtained from folder attributes, i.e.
- as the property of a folder (one theme per line)
- as an object located in the folder that is callable and that
returns a tuple.
Local themes are computed by collecting all theme information from
the portal to the context folder.
The format for describing themes is:
- simply a string containing the theme id.
- 'n-m:theme'
Where:
'theme' is the theme id
(n, m) is a couple with n <= m that describes the interval inside which
the theme will be used:
(0, 0) means the current folder and all subfolders
(1, 0) means all subfolders below the current folder
(1, 1) means the subfolders of level 1
(0, 1) means the folder and the subfolders of level 1
(n, n) means the subfolders of level n
...
With a folder property called '.cpsskins_theme':
Lines with intervals:
0-1:theme1
2-4:theme2
6-0:theme3
String with interval:
0-1:theme1
String without interval:
theme1
With a script called '.cpsskins_theme.py' placed in a folder:
Tuple with intervals:
return ('0-1:theme1', '2-4:theme2', '6-0:theme3')
String with interval:
return '0-1:theme'
To select the page of a theme, add '+page' to the theme name where
'page' is the page's name.
|