source: publico/il.spdo/trunk/il/spdo/browser/stylesheets/README.txt @ 5327

Última Alteração nesse arquivo desde 5327 foi 5327, incluída por fabianosantos, 8 anos atrás

Import inicial.

File size: 2.2 KB
Linha 
1README for the 'browser/stylesheets/' directory
2===============================================
3
4This folder is a Zope 3 Resource Directory acting as a repository for
5stylesheets.
6
7Its declaration is located in 'browser/configure.zcml':
8
9    <!-- Resource directory for stylesheets -->
10    <browser:resourceDirectory
11        name="il.spdo.stylesheets"
12        directory="stylesheets"
13        layer=".interfaces.IThemeSpecific"
14        />
15
16A stylesheet placed in this directory (e.g. 'main.css') can be accessed from
17this relative URL:
18
19    "++resource++il.spdo.stylesheets/main.css"
20
21Note that it might be better to register each of these resources separately if
22you want them to be overridable from zcml directives.
23
24The only way to override a resource in a resource directory is to override the
25entire directory (all elements have to be copied over).
26
27A Zope 3 browser resource declared like this in 'browser/configure.zcml':
28
29    <browser:resource
30        name="main.css"
31        file="stylesheets/main.css"
32        layer=".interfaces.IThemeSpecific"
33        />
34
35can be accessed from this relative URL:
36
37    "++resource++main.css"
38
39Notes
40-----
41
42* Stylesheets registered as Zope 3 resources might be flagged as not found in
43  the 'portal_css' tool if the layer they are registered for doesn't match the
44  default skin set in 'portal_skins'.
45  This can be confusing but it must be considered as a minor bug in the CSS
46  registry instead of a lack in the way Zope 3 resources are handled in
47  Zope 2.
48
49* There might be a way to interpret DTML from a Zope 3 resource view.
50  Although, if you need to use DTML for setting values in a stylesheet (the
51  same way as in default Plone stylesheets where values are read from
52  'base_properties'), it is much easier to store it in a directory that is
53  located in the 'skins/' folder of your package, registered as a File System
54  Directory View in the 'portal_skins' tool, and added to the layers of your
55  skin.
56
57* Customizing/overriding stylesheets that are originally accessed from the
58  'portal_skins' tool (e.g. Plone default stylesheets) can be done inside that
59  tool only. There is no known way to do it with Zope 3 browser resources.
60  Vice versa, there is no known way to override a Zope 3 browser resource from
61  a skin layer in 'portal_skins'.
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.