Personal tools
Contact Us 24/7 > 1 866.SIX FEET
Sections

Skip to content. | Skip to navigation

Home > Blog > Turning a static theme into a Diazo theme through the web

Blog

Turning a static theme into a Diazo theme through the web

written by Chrissy Wainwright on Thursday December 18, 2014
Comments | Filed under: , ,

static to diazo Overview

  1. Find/Create a static theme
  2. Create a new Diazo theme in the Theming control panel
  3. Copy in files from theme
  4. Write/Build the rules.xml

Detailed Steps

  1. sample final themeFirst you’ll need a static theme. You can create one yourself, or find one on a free template site (make sure to read the terms of use!). The great thing is the theme doesn’t need to know anything specific about Plone, but you should still make sure all Plone elements that you want are displayed in the theme.

  2. Create a new Diazo theme

    • Go to Site Setup > Theming (or directly to @@theming-controlpanel)
    • Click the ‘New theme’ button. You will have the option to immediately enable the new theme. Note: I do not recommend this for a live site.
  3. You are taken to a theme editor where you can upload all files from your theme. Keep the folder structure the same. The only files you’ll need in addition to your static files are rules.xml and manifest.cfgmodify theme sample

  4. Write the rules. This is a single file that replaces the static content in your theme with dynamic content from Plone, based on the rules you define. The theme editor has tools built in to help you write the rules.

Show inspectors - This turns on a couple frames in the window, showing you both the static theme and unthemed Plone site. Hovering or clicking on the elements will give you a selector for that element.

inspector

Build rule - This is a wizard that writes rules for you based on settings you enter and elements you select. This is very helpful for learning Diazo syntax.

Build rule 1

build rule 2

Help - This displays the manual for plone.app.theming - the product that turns your Diazo theme into a Plone theme.

Once you have built all the rules, you can then Activate your theme in the Theming Control Panel to apply it to the entire site.


Like what you've read? Have a suggestion of something you'd like to see? Leave a comment below! You can see more trainings like this one at sixfeetup.com/plone-cms/plone-how-to. Also, be sure to sign up for our weekly Plone & Python How-To digests.

 
Add comment

You can add a comment by filling out the form below. Plain text formatting.

puzzle

Next Steps


Select a type of support:

Contact our sales team

First name:
Last name:
Email:
Phone Number:
Message:
Fight spam:
What is + ?
 
Call Us 1 866.SIX FEET
Sections