Through the Web Theming using Python

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:

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:

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

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.

Packt

Share
Published by
Packt

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago