Book Image

Plone 3 Theming

Book Image

Plone 3 Theming

Overview of this book

Themes are among the most powerful features that can be used to customize a web site, especially in Plone. Using custom themes can help you brand your site for a particular corporate image; it ensures standards compliance and creates easily navigable layouts. But most Plone users still continue to use default themes as developing and deploying themes that are flexible and easily maintainable is not always straightforward. This book teaches best practices of Plone theme development, focusing on Plone 3. It provides you with all the information useful for creating a robust and flexible Plone theme. It also provides a sneak peek into the future of Plone's theming system. In this book you will learn how to create flexible, powerful, and professional Plone themes. It is a step-by-step tutorial on how to work with Plone themes. It also provides a more holistic look at how a real-world theme is constructed. We look at the tools required for theming a web site. The book covers major topics such as configuring the development environment, creating a basic theme product, add-on tools and skinning tricks, integrating multimedia with Plone, and configuring your site's look and feel through the Zope Management Interface (ZMI). Finally, the book takes a close look at the thrilling and greatly simplified future of theming Plone sites.
Table of Contents (20 chapters)
Plone 3 Theming
Credits
About the Author
About the Reviewers
Preface

Preface

Themes are among the most powerful features that can be used to customize a web site, especially in Plone. Using custom themes can help you brand your site for a particular corporate image; it ensures standards compliance and creates easily-navigable layouts. But most Plone users still continue to use default themes, as developing and deploying themes that are flexible and easily maintainable is not always straightforward.

This book teaches best practices of Plone theme development, focusing on Plone 3. It provides you with all the information useful for creating a robust and flexible Plone theme. It also provides a sneak peek into the future of Plone's theming system.

In this book you will learn how to create flexible, powerful, and professional Plone themes. It is a step-by-step tutorial on how to work with Plone themes. It also provides a more holistic look at how a real-world theme is constructed. We look at the tools required for theming a web site. The book covers major topics such as configuring the development environment, creating a basic theme product, add-on tools and skinning tricks, integrating multimedia with Plone, and configuring your site's look and feel through the Zope Management Interface (ZMI). Finally, the book takes a close look at the thrilling and greatly-simplified future of theming Plone sites.

What this book covers

In Chapter 1, we will take a look at how theming has become more complex with the newest release of Plone and how this impacts themers. We will also compare other popular CMS platforms with Plone.

In Chapter 2, we will take a look at the recommended tools that are needed for theming. We will also take a look at the browser add-ons that are available for inspecting a web site's CSS, JavaScript, color palette, and more.

In Chapter 3, we will configure the development environment. We will also learn some of the jargon associated with Plone 3 development.

In Chapter 4, we will learn how to create a vanilla theme product and install it.

In Chapter 5, we will learn how to expose a theme product to a filesystem. We will take a look at the elements that compose the component architecture for a theme product. We will also learn how the skin layers and through-the-web configuration work. And finally, we will take a look at how to take many of these changes and incorporate them in a filesystem product.

In Chapter 6, we will focus on basic Zope 3 components that are involved in filesystem theme development. We will learn how to use ZCML code to tie together the Zope 3 components. We will also learn how to use images, stylesheets, and browser resources and how to write browser views.

In Chapter 7, we will focus on viewlets, viewlet managers, and how to manipulate them. We will take a look at portlets and how to customize them. Finally, we will learn how portal_view_customizations can be used to manipulate Zope 3 templates through the Web.

In Chapter 8, we will learn what a Zope Page Templates (ZPT) system is. We will also take a look at Template Attribute Language (TAL) and learn common TAL expressions that are used in Plone's templates.

In Chapter 9, we will learn how to create a custom theme product, how to modify the file structure, how to set up a Plone theme to use mostly skin layers for images and stylesheets, how to install the theme product, and how to customize the content of your site to support the design.

In Chapter 10, we will learn how to change the logo, how to modify the portal_actions on a site, how to modify various viewlets and portlets and the templates that are used to render a Plone site, and how to do basic CSS styling.

In Chapter 11, we will learn how to create custom home page views, how to do sectional styling, how to enable and create sectional banners, and how to test our site against multiple browsers.

In Chapter 12, we will take a look at the popular add-ons, the current state of sub-site theming, non-Plone products that can be used to alter the site's look and feel, and Plone-specific debugging tools.

In Chapter 13, we will learn how to embed multimedia into the content of a page and into a page template. We will also take a look at the Plone-specified add-ons that provide multimedia support.

In Chapter 14, we will take a look at the suggested development environments, theme deployment workflow, the quality assurance process, and how to contribute to the Plone theming community by creating publically available themes.

In Chapter 15, we will take a sneak peek into the future of rules-based theming for Plone. This chapter will feature a complete walk-through of theming a site using the collective.xdv add-on.

What you need for this book

To run a Plone 3-based web site you need:

Operating system requirements:

  • Windows XP or later

  • OSX 10.4.x or later

  • Linux 2.6.x or later

  • Python 2.4 (Plone 3.x series do not work with Python 2.5, 2.6, or 3.0)

On OSX and Linux you need to have development tools (GCC) installed for installing Plone.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Notice the enabled flag here, and also notice that it's not necessary to include the .dtml indication in the id field, even though we will be using DTML."

A block of code is set as follows. (Code and markup preceded and ended with ellipses, "...", are extracted from the full context of code and/or a larger body of code and markup. You will also see the occasional use of "[snip]" for the same purpose. Please reference the downloadable code packet to see the entire work.)

<?xml version="1.0"?>
<object name="portal_css">
<stylesheet title=""
id="ace.css"
media="screen" rel="stylesheet" rendering="import"
cacheable="True" compression="safe" cookable="True"
enabled="1" expression=""/>
</object>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<?xml version="1.0"?>
<object name="portal_css">
<stylesheet title=""
id="ace.css"
media="screen" rel="stylesheet" rendering="import"
cacheable="True" compression="safe" cookable="True"
enabled="1" expression=""/>
</object>

Any command-line input or output is written as follows:

./bin/buildout -n

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Within the site_actions category you will find the menu options that correspond to the top navigation on a default Plone installation. By default, these include Site Map, Accessibility, Contact, and Site Setup."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an email to , and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email to .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/3872_Code.zip to directly download the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve the subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or web site name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.