1 README for the 'browser/images/' directory
2 ==========================================
4 This folder is a Zope 3 Resource Directory acting as a repository for images.
6 Its declaration is located in 'browser/configure.zcml':
8 <!-- Resource directory for images -->
9 <browser:resourceDirectory
10 name="koehsel.theme.images"
12 layer=".interfaces.IThemeSpecific"
15 An image placed in this directory (e.g. 'logo.png') can be accessed from
18 "++resource++koehsel.theme.images/logo.png"
20 Note that it might be better to register each of these resources separately if
21 you want them to be overridable from zcml directives.
23 The only way to override a resource in a resource directory is to override the
24 entire directory (all elements have to be copied over).
26 A Zope 3 browser resource declared like this in 'browser/configure.zcml':
30 file="images/logo.png"
31 layer=".interfaces.IThemeSpecific"
34 can be accessed from this relative URL:
36 "++resource++logo.png"
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
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
55 Vice versa, there is no known (easy) way to override a Zope 3 browser
56 resource from a skin layer in 'portal_skins'.