SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Use Symfony2 components inside WordPress
Use Symfony2 components inside WordPress Use Symfony2 components inside WordPress
Use Symfony2 components inside WordPress
Maurizio Pelizzone
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why how
brucelawson
 

Mais procurados (20)

Use Symfony2 components inside WordPress
Use Symfony2 components inside WordPress Use Symfony2 components inside WordPress
Use Symfony2 components inside WordPress
 
How to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's EncryptHow to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's Encrypt
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third Plugin
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
 
How to create a joomla component from scratch
How to create a joomla component from scratchHow to create a joomla component from scratch
How to create a joomla component from scratch
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter Wilson
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme Development
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Why ExpressionEngine is Great for Designers
Why ExpressionEngine is Great for DesignersWhy ExpressionEngine is Great for Designers
Why ExpressionEngine is Great for Designers
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Take Command of WordPress With WP-CLI at WordCamp Long BeachTake Command of WordPress With WP-CLI at WordCamp Long Beach
Take Command of WordPress With WP-CLI at WordCamp Long Beach
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why how
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress Security
 
Joomla : Akeeba backup and Amazon S3
Joomla : Akeeba backup and Amazon S3Joomla : Akeeba backup and Amazon S3
Joomla : Akeeba backup and Amazon S3
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ Telerik
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie Optimalisatie
 
Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3Develop advance joomla! MVC Component for version 3
Develop advance joomla! MVC Component for version 3
 
SocketStream
SocketStreamSocketStream
SocketStream
 

Semelhante a How to Get Started Theming Plone

Unknown plone
Unknown ploneUnknown plone
Unknown plone
cdw9
 
Bjvenus getting-started
Bjvenus getting-startedBjvenus getting-started
Bjvenus getting-started
By Joomla
 
Bjvenus getting-started
Bjvenus getting-startedBjvenus getting-started
Bjvenus getting-started
By Joomla
 

Semelhante a How to Get Started Theming Plone (20)

Unknown plone
Unknown ploneUnknown plone
Unknown plone
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Creating custom themes in AtoM
Creating custom themes in AtoMCreating custom themes in AtoM
Creating custom themes in AtoM
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic Templates
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic Templates
 
Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with Zen
 
Using Buildout, GenericSetup and a Policy Package to Rule the World
Using Buildout, GenericSetup and a Policy Package to Rule the WorldUsing Buildout, GenericSetup and a Policy Package to Rule the World
Using Buildout, GenericSetup and a Policy Package to Rule the World
 
Building Volto Addons, Plone Conf 2020
Building Volto Addons, Plone Conf 2020Building Volto Addons, Plone Conf 2020
Building Volto Addons, Plone Conf 2020
 
Martin Aspeli Extending And Customising Plone 3
Martin Aspeli   Extending And Customising Plone 3Martin Aspeli   Extending And Customising Plone 3
Martin Aspeli Extending And Customising Plone 3
 
Angular View Encapsulation
Angular View EncapsulationAngular View Encapsulation
Angular View Encapsulation
 
Introduction to Plone (PyCon Ireland 2010)
Introduction to Plone (PyCon Ireland 2010)Introduction to Plone (PyCon Ireland 2010)
Introduction to Plone (PyCon Ireland 2010)
 
Joomla Templates101
Joomla Templates101Joomla Templates101
Joomla Templates101
 
The Future of the Web
The Future of the WebThe Future of the Web
The Future of the Web
 
Drupal intro for Symfony developers
Drupal intro for Symfony developersDrupal intro for Symfony developers
Drupal intro for Symfony developers
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and Drupal
 
Bjvenus getting-started
Bjvenus getting-startedBjvenus getting-started
Bjvenus getting-started
 
Bjvenus getting-started
Bjvenus getting-startedBjvenus getting-started
Bjvenus getting-started
 
Building Content Types with Dexterity
Building Content Types with DexterityBuilding Content Types with Dexterity
Building Content Types with Dexterity
 
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsUpgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
 

Mais de cdw9

Mais de cdw9 (8)

Debugging Your Plone Site
Debugging Your Plone SiteDebugging Your Plone Site
Debugging Your Plone Site
 
Crafting an Impactful Home Page That Your Editors Will Love
Crafting an Impactful Home Page That Your Editors Will LoveCrafting an Impactful Home Page That Your Editors Will Love
Crafting an Impactful Home Page That Your Editors Will Love
 
Contributing to Open Source (Lightning Talk version)
Contributing to Open Source (Lightning Talk version)Contributing to Open Source (Lightning Talk version)
Contributing to Open Source (Lightning Talk version)
 
Debugging with PDB
Debugging with PDBDebugging with PDB
Debugging with PDB
 
Introduction to Transmogrifier
Introduction to TransmogrifierIntroduction to Transmogrifier
Introduction to Transmogrifier
 
Contributing to Open Source
Contributing to Open SourceContributing to Open Source
Contributing to Open Source
 
The Future of [Plone] Theming
The Future of [Plone] ThemingThe Future of [Plone] Theming
The Future of [Plone] Theming
 
Making CSS and Firebug Your New Friends
Making CSS and Firebug Your New FriendsMaking CSS and Firebug Your New Friends
Making CSS and Firebug Your New Friends
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

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