1 min read

Download code from here

(Read more interesting articles on Plone here.)

Examining themes in the Zope Management Interface

Now that we have seen in part how themes work, let us take a closer look at their representation in Zope Object Database (ZODB).

Browse to http://localhost:8080/Plone. Click on Site Setup Zope Management Interface| and you should see:

Through the Web Theming using Python

This is a Through the Web (TTW) representation of all the objects in the database at the Plone site level (the application root is one level above).

The most frequently used theme-related objects here are:

  • portal_css
  • portal_javascripts
  • portal_skins
  • portal_view_customizations

Of these, portal_css and portal_javascripts are most often used to enable their respective debug modes, wherein the CSS and JavaScript files are not compiled into a single file (not to be confused with Zope 2’s debug mode which detects filesystem changes in real time when enabled).

Take a look at your site with Firebug, in particular the style tab.

You should see:

Through the Web Theming using Python

Now enable debug mode in portal_javascripts and look again. You should see:

Through the Web Theming using Python

When portal_css debug mode is enabled, we can see (or by viewing the HTML source) that the CSS files are loaded individually in Firebug.

The same applies to portal_javascripts debug mode.

This can be absolutely invaluable when trying to correlate various visual elements with their respective sources.

In addition to debug mode, you can also add CSS/ JavaScript files to their respective registries through the Web, which brings us to the next topic.


Subscribe to the weekly Packt Hub newsletter. We'll send you this year's Skill Up Developer Skills Report.

* indicates required

LEAVE A REPLY

Please enter your comment!
Please enter your name here