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

Working with JavaScripts in your theme product


JavaScripts work similar to CSS stylesheets, with a few key differences. If you add a file to the custom folder, it must be of type "file". To add it to your registry through the web, go to portal_javascripts and add it there. Again, you may need to enable debug mode to see your JavaScript changes. Once again, this is not the advisable way of adding JavaScripts, and you will typically do this on the filesystem instead.

To add a JavaScript to your filesystem product, add code like this to your profiles/jsregistry.xml file:

<?xml version="1.0"?>
<object name="portal_javascripts">
<javascript cacheable="True" compression="none" cookable="True"
enabled="True" expression="" id="sifr.js" inline="False"/>
</object>

You can either add this script file to your skins/plonetheme_mytheme_custom_templates folder, or you can create a folder that specifically holds JavaScripts and modify the boilerplate as needed. The boilerplate...