source: publico/il.spdo/trunk/il/spdo/browser/images/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.0 KB
Linha 
1README for the 'browser/images/' directory
2==========================================
3
4This folder is a Zope 3 Resource Directory acting as a repository for images.
5
6Its declaration is located in 'browser/configure.zcml':
7
8    <!-- Resource directory for images -->
9    <browser:resourceDirectory
10        name="il.spdo.images"
11        directory="images"
12        layer=".interfaces.IThemeSpecific"
13        />
14
15An image placed in this directory (e.g. 'logo.png') can be accessed from
16this relative URL:
17
18    "++resource++il.spdo.images/logo.png"
19
20Note that it might be better to register each of these resources separately if
21you want them to be overridable from zcml directives.
22
23The only way to override a resource in a resource directory is to override the
24entire directory (all elements have to be copied over).
25
26A Zope 3 browser resource declared like this in 'browser/configure.zcml':
27
28    <browser:resource
29        name="logo.png"
30        file="images/logo.png"
31        layer=".interfaces.IThemeSpecific"
32        />
33
34can be accessed from this relative URL:
35
36    "++resource++logo.png"
37
38Notes
39-----
40
41* Whatever the way they are declared (in bulk inside a resource directory or
42  as separate resources), images registered as Zope 3 browser resources don't
43  have all the attributes that Zope 2 image objects have (i.e. the 'title'
44  property and the 'tag()' and 'get_size()' methods).
45  This means that if you want the html tag of your image to be auto-generated
46  (this is the case by default for the portal logo), you should store it in a
47  directory that is located in the 'skins/' folder of your package, registered
48  as a File System Directory View in the 'portal_skins' tool, and added to the
49  layers of your skin.
50
51* Customizing/overriding images that are originally accessed from the
52  'portal_skins' tool (e.g. Plone default logo and icons) can be done inside
53  that tool only. There is no known way to do it with Zope 3 browser
54  resources.
55  Vice versa, there is no known (easy) way to override a Zope 3 browser
56  resource from 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.