SlideShare a Scribd company logo
PLONE SYMPOSIUM EAST 2012




How to Get Started
 Theming Plone
    Chrissy Wainwright
Choose Your Own Adventure
                                             PLONE SYMPOSIUM EAST 2012



You are given a Plone 4 site without any styles.
Do you:


Build a Diazo theme... go to slide 3
Build a traditional Plone theme... go to slide 6
Make changes in the site... go to slide 18
Diazo Theming
                                         PLONE SYMPOSIUM EAST 2012



Why you would choose a Diazo theme:
* You have already built a static theme
* The theme needs a lot of Plone elements
  moved around
* You want to keep the theme completely
  separate
* You don’t have time to learn the ins and
  outs of Plone
What is Diazo?
                                          PLONE SYMPOSIUM EAST 2012



Diazo allows you to take a static theme (HTML
file with CSS, JS, etc) and hook the dynamic Plone
elements into it using a set of rules.
Diazo Rules
                                          PLONE SYMPOSIUM EAST 2012




<replace css:theme=”#logo” 	
  css:content=”#portal-logo”/>

<after css:theme-children=”head”
  content=”/html/head/script” />

<drop css:theme=”#column-two”
	 if-content=”not(//*[@id=’portal-column-two’])”/>

<copy attributes=”class” css:content=”body”
  css:theme=”body”/>
Traditional Plone Theming
                                                PLONE SYMPOSIUM EAST 2012



Why you would choose a traditional theme:
* You already know how to do Plone theming
* You are only making minor template and
  styling changes
* You are stuck using an older version of Plone
* You want to be able to make theme changes
  in-site later *


                   * coming soon in plone.app.theming!
Change the Logo
                                            PLONE SYMPOSIUM EAST 2012




The name of the logo image to be used can be
found and changed in base_properties.props


Put your new logo in skins/images/ and make
sure the name matches that in base_properties,
or that it is the same filename as the current logo,
which will override it.
Apply Styles
                                            PLONE SYMPOSIUM EAST 2012




Put a file into your theme/skins/styles folder
called ploneCustom.css


Create new CSS files by putting them in the styles
folder, and adding them to the CSS registry.

cssregistry.xml - Generic Setup - portal_css
Generic Setup
                                          PLONE SYMPOSIUM EAST 2012




Generic Setup is the connection between
content/changes in your site and the filesystem.


ZMI > portal_setup > Import/Export tab

theme/profiles/default/
Generic Setup
                                              PLONE SYMPOSIUM EAST 2012




 * portal_actions : Action Providers : actions.xml
 * portal_css : Stylesheet Registry : cssregistry.xml
 * portal_javascripts : Javascript Registry :
	 jsregistry.xml
 * portal_types : Types Tool : types/[type].xml
 * @@manage-viewlets : Viewlet Settings :
	 viewlets.xml
Finding Plone Templates
                                          PLONE SYMPOSIUM EAST 2012




Using omelette in your buildout, you can find the
templates you want to override.


Viewlets: plone/app/layout/viewlets

Portlets: plone/app/portlets/portlets


Other templates: Products/CMFPlone/skins/
Identify Plone Elements: Viewlets
                                    PLONE SYMPOSIUM EAST 2012
Overriding Viewlets: z3c.jbot
                                          PLONE SYMPOSIUM EAST 2012




z3c.jbot can be used when you need to make
template changes to a viewlet.


In theme/browser/configure.zcml:

<include package=”z3c.jbot” file=”meta.zcml” />

<browser:jbot
      directory=”template-overrides”
      layer=”.interfaces.IThemeSpecific” />
Override Viewlets: z3c.jbot
                                      PLONE SYMPOSIUM EAST 2012




Templates can now go into
theme/browser/template-overrides named by
referencing the dotted path to the file:


plone.app.layout.viewlets.footer.pt
Identify Plone Elements: Portlets
                                    PLONE SYMPOSIUM EAST 2012
Overriding Portlets
                                           PLONE SYMPOSIUM EAST 2012




In theme/browser/configure.zcml:

<include package=”plone.app.portlets” />

<plone:portletRenderer
    portlet=”plone.app.portlets.portlets.events.
							 IEventsPortlet”
    template=”events.pt”
    layer=”interfaces.IThemeSpecific” />
Overriding Content Type Templates
                                       PLONE SYMPOSIUM EAST 2012




If the original template is found in skins:
 * put a copy in your theme/skins/ folder
 * use the exact same name
 * copy any associated .metadata files
 * ex: Products/CMFPlone/skins/plone_content/
    document_view.pt
Custom Folder (In-Site Changes)
                                        PLONE SYMPOSIUM EAST 2012



This method is not recommended for completely
theming your site! Only for making quick fixes.


ZMI > portal_skins > custom
ZMI > portal_view_customizations
Custom Folder Overrides
                                        PLONE SYMPOSIUM EAST 2012



In portal_skins, open the template you want to
override (e.g. plone_content > document_view).


Click the customize button. This will create a
copy in the custom folder so you can now make
changes.
Common Stumbling Blocks
                                        PLONE SYMPOSIUM EAST 2012




What to look for when your changes are not
showing up




                                          Flickr: gfpeck
Common Stumbling Blocks
                                      PLONE SYMPOSIUM EAST 2012




1. Make sure the theme is installed


ZMI > portal_quickinstaller


(or Site Setup > Add-Ons)
Common Stumbling Blocks
                                           PLONE SYMPOSIUM EAST 2012




2. Restart your instance after certain changes
* .zcml
* .py
* new z3c.jbot override
Common Stumbling Blocks
                              PLONE SYMPOSIUM EAST 2012




3. Turn on Development mode


ZMI > portal_css
ZMI > portal_javascripts
Common Stumbling Blocks
                                    PLONE SYMPOSIUM EAST 2012




4. Generic Setup - XML Files
 * import changes in
	 ZMI > portal_setup > import tab
Common Stumbling Blocks
                                       PLONE SYMPOSIUM EAST 2012




5. Check the custom folder


ZMI > portal_skins > custom
ZMI > portal_view_customizations > contents
Common Stumbling Blocks
                                      PLONE SYMPOSIUM EAST 2012




5. Skins Order


ZMI > portal_skins > properties tab
PLONE SYMPOSIUM EAST 2012




   eck out
Ch
           .com/ demos
six feetup

More Related Content

What's hot (20)

PPTX
Use Symfony2 components inside WordPress
Maurizio Pelizzone
 
PPTX
How to Issue and Activate Free SSL using Let's Encrypt
Mayeenul Islam
 
KEY
Writing your Third Plugin
Justin Ryan
 
PDF
WordPress Performance optimization
Brecht Ryckaert
 
PDF
How to create a joomla component from scratch
Tim Plummer
 
PDF
Contributing to WordPress Core - Peter Wilson
WordCamp Sydney
 
PDF
Approaches To WordPress Theme Development
Catch Themes
 
PPTX
Intro to Plugin Development, Miami WordCamp, 2015
topher1kenobe
 
PPTX
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
topher1kenobe
 
PDF
Intro to WordPress Plugin Development
Brad Williams
 
PDF
Why ExpressionEngine is Great for Designers
FortySeven Media
 
PDF
Html5 intro
Kevin DeRudder
 
PPTX
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Diana Thompson
 
PDF
HTML5 Who what where when why how
brucelawson
 
PDF
WordCamp Finland 2015 - WordPress Security
Tiia Rantanen
 
PDF
Joomla : Akeeba backup and Amazon S3
Marc DECHEVRE
 
PPTX
Build a WordPress theme from HTML5 template @ Telerik
Mario Peshev
 
PDF
WordPress Performantie Optimalisatie
Brecht Ryckaert
 
PPTX
Develop advance joomla! MVC Component for version 3
Gunjan Patel
 
PDF
SocketStream
Paul Jensen
 
Use Symfony2 components inside WordPress
Maurizio Pelizzone
 
How to Issue and Activate Free SSL using Let's Encrypt
Mayeenul Islam
 
Writing your Third Plugin
Justin Ryan
 
WordPress Performance optimization
Brecht Ryckaert
 
How to create a joomla component from scratch
Tim Plummer
 
Contributing to WordPress Core - Peter Wilson
WordCamp Sydney
 
Approaches To WordPress Theme Development
Catch Themes
 
Intro to Plugin Development, Miami WordCamp, 2015
topher1kenobe
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
topher1kenobe
 
Intro to WordPress Plugin Development
Brad Williams
 
Why ExpressionEngine is Great for Designers
FortySeven Media
 
Html5 intro
Kevin DeRudder
 
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Diana Thompson
 
HTML5 Who what where when why how
brucelawson
 
WordCamp Finland 2015 - WordPress Security
Tiia Rantanen
 
Joomla : Akeeba backup and Amazon S3
Marc DECHEVRE
 
Build a WordPress theme from HTML5 template @ Telerik
Mario Peshev
 
WordPress Performantie Optimalisatie
Brecht Ryckaert
 
Develop advance joomla! MVC Component for version 3
Gunjan Patel
 
SocketStream
Paul Jensen
 

Similar to How to Get Started Theming Plone (20)

PDF
Unknown plone
cdw9
 
DOCX
Creating a basic joomla
shailendra vishwakarma
 
PDF
Creating custom themes in AtoM
Artefactual Systems - AtoM
 
ODP
Joomla Day UK 2009 Basic Templates
Chris Davenport
 
ODP
Joomla! Day UK 2009 Basic Templates
Andy Wallace
 
PPTX
Drupal Camp Manila 2014 - Theming with Zen
Japo Domingo
 
PDF
Using Buildout, GenericSetup and a Policy Package to Rule the World
Clayton Parker
 
PDF
Building Volto Addons, Plone Conf 2020
Alok Kumar Singh
 
PDF
Martin Aspeli Extending And Customising Plone 3
Vincenzo Barone
 
PPTX
Angular View Encapsulation
Jennifer Estrada
 
ODP
Introduction to Plone (PyCon Ireland 2010)
Kevin Gill
 
PPTX
Joomla Templates101
Barb Ackemann
 
PDF
The Future of the Web
Ray Nicholus
 
PDF
Drupal intro for Symfony developers
Samuel Solís Fuentes
 
PPT
Joomla Day Austin Part 4
Kyle Ledbetter
 
PPTX
How to Create a Theme Module in Odoo 17 - Odoo 17 Slides
Celine George
 
PDF
Bootstrap Framework and Drupal
Jim Birch
 
PDF
Bjvenus getting-started
By Joomla
 
PDF
Bjvenus getting-started
By Joomla
 
PDF
Building Content Types with Dexterity
David Glick
 
Unknown plone
cdw9
 
Creating a basic joomla
shailendra vishwakarma
 
Creating custom themes in AtoM
Artefactual Systems - AtoM
 
Joomla Day UK 2009 Basic Templates
Chris Davenport
 
Joomla! Day UK 2009 Basic Templates
Andy Wallace
 
Drupal Camp Manila 2014 - Theming with Zen
Japo Domingo
 
Using Buildout, GenericSetup and a Policy Package to Rule the World
Clayton Parker
 
Building Volto Addons, Plone Conf 2020
Alok Kumar Singh
 
Martin Aspeli Extending And Customising Plone 3
Vincenzo Barone
 
Angular View Encapsulation
Jennifer Estrada
 
Introduction to Plone (PyCon Ireland 2010)
Kevin Gill
 
Joomla Templates101
Barb Ackemann
 
The Future of the Web
Ray Nicholus
 
Drupal intro for Symfony developers
Samuel Solís Fuentes
 
Joomla Day Austin Part 4
Kyle Ledbetter
 
How to Create a Theme Module in Odoo 17 - Odoo 17 Slides
Celine George
 
Bootstrap Framework and Drupal
Jim Birch
 
Bjvenus getting-started
By Joomla
 
Bjvenus getting-started
By Joomla
 
Building Content Types with Dexterity
David Glick
 
Ad

More from cdw9 (8)

PDF
Debugging Your Plone Site
cdw9
 
PDF
Crafting an Impactful Home Page That Your Editors Will Love
cdw9
 
PDF
Contributing to Open Source (Lightning Talk version)
cdw9
 
PDF
Debugging with PDB
cdw9
 
PDF
Introduction to Transmogrifier
cdw9
 
PDF
Contributing to Open Source
cdw9
 
PDF
The Future of [Plone] Theming
cdw9
 
PDF
Making CSS and Firebug Your New Friends
cdw9
 
Debugging Your Plone Site
cdw9
 
Crafting an Impactful Home Page That Your Editors Will Love
cdw9
 
Contributing to Open Source (Lightning Talk version)
cdw9
 
Debugging with PDB
cdw9
 
Introduction to Transmogrifier
cdw9
 
Contributing to Open Source
cdw9
 
The Future of [Plone] Theming
cdw9
 
Making CSS and Firebug Your New Friends
cdw9
 
Ad

Recently uploaded (20)

PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
The Future of Artificial Intelligence (AI)
Mukul
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 

How to Get Started Theming Plone

  • 1. PLONE SYMPOSIUM EAST 2012 How to Get Started Theming Plone Chrissy Wainwright
  • 2. Choose Your Own Adventure PLONE SYMPOSIUM EAST 2012 You are given a Plone 4 site without any styles. Do you: Build a Diazo theme... go to slide 3 Build a traditional Plone theme... go to slide 6 Make changes in the site... go to slide 18
  • 3. Diazo Theming PLONE SYMPOSIUM EAST 2012 Why you would choose a Diazo theme: * You have already built a static theme * The theme needs a lot of Plone elements moved around * You want to keep the theme completely separate * You don’t have time to learn the ins and outs of Plone
  • 4. What is Diazo? PLONE SYMPOSIUM EAST 2012 Diazo allows you to take a static theme (HTML file with CSS, JS, etc) and hook the dynamic Plone elements into it using a set of rules.
  • 5. Diazo Rules PLONE SYMPOSIUM EAST 2012 <replace css:theme=”#logo” css:content=”#portal-logo”/> <after css:theme-children=”head” content=”/html/head/script” /> <drop css:theme=”#column-two” if-content=”not(//*[@id=’portal-column-two’])”/> <copy attributes=”class” css:content=”body” css:theme=”body”/>
  • 6. Traditional Plone Theming PLONE SYMPOSIUM EAST 2012 Why you would choose a traditional theme: * You already know how to do Plone theming * You are only making minor template and styling changes * You are stuck using an older version of Plone * You want to be able to make theme changes in-site later * * coming soon in plone.app.theming!
  • 7. Change the Logo PLONE SYMPOSIUM EAST 2012 The name of the logo image to be used can be found and changed in base_properties.props Put your new logo in skins/images/ and make sure the name matches that in base_properties, or that it is the same filename as the current logo, which will override it.
  • 8. Apply Styles PLONE SYMPOSIUM EAST 2012 Put a file into your theme/skins/styles folder called ploneCustom.css Create new CSS files by putting them in the styles folder, and adding them to the CSS registry. cssregistry.xml - Generic Setup - portal_css
  • 9. Generic Setup PLONE SYMPOSIUM EAST 2012 Generic Setup is the connection between content/changes in your site and the filesystem. ZMI > portal_setup > Import/Export tab theme/profiles/default/
  • 10. Generic Setup PLONE SYMPOSIUM EAST 2012 * portal_actions : Action Providers : actions.xml * portal_css : Stylesheet Registry : cssregistry.xml * portal_javascripts : Javascript Registry : jsregistry.xml * portal_types : Types Tool : types/[type].xml * @@manage-viewlets : Viewlet Settings : viewlets.xml
  • 11. Finding Plone Templates PLONE SYMPOSIUM EAST 2012 Using omelette in your buildout, you can find the templates you want to override. Viewlets: plone/app/layout/viewlets Portlets: plone/app/portlets/portlets Other templates: Products/CMFPlone/skins/
  • 12. Identify Plone Elements: Viewlets PLONE SYMPOSIUM EAST 2012
  • 13. Overriding Viewlets: z3c.jbot PLONE SYMPOSIUM EAST 2012 z3c.jbot can be used when you need to make template changes to a viewlet. In theme/browser/configure.zcml: <include package=”z3c.jbot” file=”meta.zcml” /> <browser:jbot directory=”template-overrides” layer=”.interfaces.IThemeSpecific” />
  • 14. Override Viewlets: z3c.jbot PLONE SYMPOSIUM EAST 2012 Templates can now go into theme/browser/template-overrides named by referencing the dotted path to the file: plone.app.layout.viewlets.footer.pt
  • 15. Identify Plone Elements: Portlets PLONE SYMPOSIUM EAST 2012
  • 16. Overriding Portlets PLONE SYMPOSIUM EAST 2012 In theme/browser/configure.zcml: <include package=”plone.app.portlets” /> <plone:portletRenderer portlet=”plone.app.portlets.portlets.events. IEventsPortlet” template=”events.pt” layer=”interfaces.IThemeSpecific” />
  • 17. Overriding Content Type Templates PLONE SYMPOSIUM EAST 2012 If the original template is found in skins: * put a copy in your theme/skins/ folder * use the exact same name * copy any associated .metadata files * ex: Products/CMFPlone/skins/plone_content/ document_view.pt
  • 18. Custom Folder (In-Site Changes) PLONE SYMPOSIUM EAST 2012 This method is not recommended for completely theming your site! Only for making quick fixes. ZMI > portal_skins > custom ZMI > portal_view_customizations
  • 19. Custom Folder Overrides PLONE SYMPOSIUM EAST 2012 In portal_skins, open the template you want to override (e.g. plone_content > document_view). Click the customize button. This will create a copy in the custom folder so you can now make changes.
  • 20. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 What to look for when your changes are not showing up Flickr: gfpeck
  • 21. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 1. Make sure the theme is installed ZMI > portal_quickinstaller (or Site Setup > Add-Ons)
  • 22. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 2. Restart your instance after certain changes * .zcml * .py * new z3c.jbot override
  • 23. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 3. Turn on Development mode ZMI > portal_css ZMI > portal_javascripts
  • 24. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 4. Generic Setup - XML Files * import changes in ZMI > portal_setup > import tab
  • 25. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 5. Check the custom folder ZMI > portal_skins > custom ZMI > portal_view_customizations > contents
  • 26. Common Stumbling Blocks PLONE SYMPOSIUM EAST 2012 5. Skins Order ZMI > portal_skins > properties tab
  • 27. PLONE SYMPOSIUM EAST 2012 eck out Ch .com/ demos six feetup