O'Reilly logo

Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System by Martin Aspeli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image Resources

The browser/images directory is analogous to the brower/stylesheets directory, intended to store theme-specific images. Both are registered as resource directories in browser/configure.zcml like this:

<!-- Resource directory for stylesheets -->
<browser:resourceDirectory
    name="optilux.theme.stylesheets"
    directory="stylesheets"
    layer=".interfaces.IThemeSpecific"
     />

<!-- Resource directory for images -->
<browser:resourceDirectory
    name="optilux.theme.images"
    directory="images"
    layer=".interfaces.IThemeSpecific"
     />

To render an image myimage.jpg placed in the images directory using a standard HTML image tag, we could use a construct such as:

<img tal:attributes="src portal/++resource++optilux.theme.images/
myimage.jpg" />

Here, portal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required