David Convent - Theme It Yourself
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

David Convent - Theme It Yourself

on

  • 5,435 views

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.

Statistics

Views

Total Views
5,435
Views on SlideShare
5,413
Embed Views
22

Actions

Likes
0
Downloads
123
Comments
0

4 Embeds 22

http://www.comphumanities.org 10
http://www.europaclub.comphumanities.org 6
http://www.slideshare.net 5
http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

David Convent - Theme It Yourself Presentation Transcript

  • 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: davconvent@gmail.com ● IRC: davconvent
  • 4. This talk This talk is a tutorial, mostly given as a live demo. Detailed documentation on covered subjects is available on http://plone.org/documentation
  • 5. Documentation http://plone.org/documentation/tutorial/creating-plone-themes http://plone.org/documentation/tutorial/genericsetup http://plone.org/documentation/tutorial/customizing-main-template-viewlets http://plone.org/documentation/tutorial/buildout
  • 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 ● __init__.py is now empty (at least it can be) ● No Extensions/ folder, thus no Install.py 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 ● plone.app.layout.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!