Your SlideShare is downloading. ×
  • Like
David Convent - Theme It Yourself
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

David Convent - Theme It Yourself


Live demonstration and talk on best tools and practices for themeing a Plone site, focusing on "what's new?" in Plone 3.

Live demonstration and talk on best tools and practices for themeing a Plone site, focusing on "what's new?" in Plone 3.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Theme It Yourself Tools and Techniques for themeing a Plone 3.0 site David Convent 5th Plone Conference Naples – Oct 2007
  • 2. The Audience I need to know what you need to learn (few questions)
  • 3. About me ● Working at the Royal Belgium Institute of Naural Science ● Project: MARS (Multimedia Archaeological Research System) ● Contact: ● IRC: davconvent
  • 4. This talk This talk is a tutorial, mostly given as a live demo. Detailed documentation on covered subjects is available on
  • 5. Documentation
  • 6. File System Development Good reasons for choosing to develop on the file system: ● Repeatable ● Version-able ● Testable ● Distributable ● Lets you do more
  • 7. Tools for Initiating a new project ● Paste Script / paster $ paster create -t TEMPLATE [–svn-repository=REPOS] [–config=CONFIGFILE] [PROJECTNAME] ● ZopeSkel (demo) $ paster create –list-templates ● DIYPloneStyle
  • 8. Anatomy of a theme package ● skins/ folder still there ● is now empty (at least it can be) ● No Extensions/ folder, thus no module
  • 9. Anatomy (continued) ● zcml files – configure.zcml – skins.zcml – profiles.zcml ● profiles/ folder ● browser/ module (sub package) – configure.zcml
  • 10. Generic Setup ● Registering skins demo: Add new skin folder (skins.zcml + profiles/default/skins.xml) ● Registering stylesheets demo: browser/configure.zcml and profiles/default/cssregistry.xml
  • 11. Zope 3 resources ● Images – Don't have Zope 2 image methods (i.e. the tag() method that generates and <img/> html tag) ● Stylesheets – Not ideal when DTML is needed
  • 12. The stylesheet ● Important: manually set 'portal_css' in debug mode before starting any CSS work. ● Use of the Firefox 'Web Developer' add-on toolbar. ● Other handy Firefox extensions and add-ons: – View Source Chart – Aardvark – Firebug
  • 13. xhtml output ● Strong advise: use default Plone output ● If changing the output is really needed... – Macros and slots in Zope 2 Page Templates – New Zope 3 Viewlets implementation in Plone 3
  • 14. Playing with viewlets ● Viewlets and viewlet managers ● Viewlets in main template
  • 15. Find your way ● @@manage-viewlets ●
  • 16. Viewlet class methods ● self.render() ● self.update()
  • 17. Adding a new viewlet ● Write class/template ● Declare viewlet in zcml ● Set up the order in GS profile
  • 18. Overriding a viewlet ● Introduction to Zope 3 browser layers ● plone.theme ● plone.browserlayer
  • 19. Thank you! Any further question? Announce: Join our team during the sprint and help us create new themes for Plone!