Plone is a wonderful tool. It&#x2019;s very flexible and very powerful. When it comes to a Plone theme it&#x2019;s still flexible, it&#x2019;s still powerful&#x2026; but it&#x2019;s not easy at all.
If you only consider starting with Plone - learning curve and knowledge requirements for starting a Plone theme might be very steep and not inspiring these days.
You can&#x2019;t just pick any free HTML/CSS theme out there and make it work in Plone. Days and maybe weeks of work are waiting for you in order to make such theme &#x201C;Plone-compatible&#x201D;.
You want to go table-less, change DOCTYPE or use any advanced structure for your Plone theme? Good luck in doing and maintaining it. A 3rd-party product or next Plone&#x2019;s version might make you cry.
Those who tried to migrate a Plone theme from 2.5 to 3.0...
... that was a challenge, wasn&#x2019;t it? Of course after all you have decided to make the Plone 3.0 theme from scratch. But I know this feeling: &#x201C;It just can&#x2019;t be that hard. Plone is great and it should be easy to migrate a theme. There should be a button somewhere to do just that, right?&#x201D;
Yes, we have made a lot of mistakes in Plone when it comes to Plone themes. But...
We realize that it should be easier to make a new Plone theme, and here's where we're heading with that in Plone 5.
Wouldn&#x2019;t it be wonderful to make Plone themes in a more relaxed manner, with much more freedom and definitely with less knowledge required? Not to worry a lot about migration of a theme? To be able to pick a theme from templatemonster.com or oswd.org and make it a Plone theme without hitting your head against a brick wall?
A couple of new approaches are already here, ready to serve.
A new technology comes to rescue - Deliverance. To be very brief - from a Plone integrator&#x2019;s point of view it is the tool that takes responsibility of applying your static HTML/CSS theme to a site. It can even be not Plone site at all. Deliverance maintained by Ian Biking these days, went way beyond it&#x2019;s original idea by Paul Everit and is much more than just a Plone theming tool. In the context of a Plone theme rather think of it as a replacement for your main_template.pt.
XDV stands for XSLT Deliverance.
Faster sibling of Deliverance.
Though Deliverance and XDV are different tools with slightly different ideas, in general XDV does the same - applies a static theme to your Plone site.
plone.org is running on XDV so its mature enough for serious deployments by the time.
Deliverance is a bit more complex to set up for proper production use these days, a bit more powerful, and possibly a good choice if you're looking to integrate many different applications like Plone, Trac, .NET applications and such into a single look and feel, or if you have a lot of different templates. XDV is the stripped down version of Deliverance that is based on original idea of Deliverance. In this talk we are going to investigate XDV way of theming a Plone site because of it being faster, it&#x2019;s simpler installation and one additional tool that might change the way you do a Plone theme.
The last for now but not least step towards happy life of the Plone theme integrators - collective.xdv package developed by Martin Aspeli, which makes XDV for Plone just one additional package away.
Obvious advantage for the Plone theme integrators - collective.xdv is the tool that lets one use XDV power without additional server-side tools and settings which Deliverance and pure XDV require. So further in the talk we will review how to use collective.xdv as the simplest way to get involved with XDV especially for Plone theme integrators.
In general it should be not hard to switch between Deliverance and XDV if you need to because they use similar ideas and approaches. Details differ though.
You might consider using collective.xdv if: your only task is to style a Plone site you can use collective.xdv. collective.xdv is Plone dependent and is not supposed to work with any other tool. While Deliverance and XDV can be used to style any web-based tools like Trac, WordPress and such (not necessary Plone-based) as well. you don&#x2019;t feel like setting up proxy, WSGI, Apache and such (most Plone theme integrators don&#x2019;t want to do that) you might consider using collective.xdv.
You might consider trying another tool if:
If you already have a Plone theme done, switching to collective.xdv will not gain you anything. Stay where you are. You need to style more than just a Plone site - your customer has corporate identity and needs intranet, public site, Trac instance, their favorite blog and other applications to be styles with the same visual theme. In this case you might still consider developing the theme with Plone and collective.xdv. But for deployment you will need to use pure XDV or Deliverance with all server-side technologies required and without collective.xdv dependancy.
From an integrator&#x2019;s point of view XDV is based on 2 main points: XML rules and static HTML of your theme.
By using these XML rules XDV imposes the theme on the generated pages.
There is no strict requirement to HTML file. XDV can be pretty much happy with invalid or not well-formed HTML. It is not even necessary to have it XML formatted. XDV does pretty good job for you by fixing your HTML &#x201C;on the fly&#x201D; when theme transformation happens.
There is one advise though. To make your life easier it is a good idea to follow basic IDs and classes of Plone for the elements that you assume will be replaced with the content from Plone. This will let you just copy some styles from Plone later if you don&#x2019;t have styles for those elements in your stylesheets.
Example <copy content="//*[@id='portal-footer']/*" theme="//*[@id='footer']" />
You specify a piece of content in your Plone site and an HTML element in your static theme which XDV should glue together.
For specifying both - the piece of content in the Plone site and the HTML element in the theme XPath is used. XDV doesn&#x2019;t support CSS selectors, but it&#x2019;s very easy to get XPath. We will see how in the practical part of the talk. We will also review rules, supported by XDV.
What&#x2019;s the real benefit of using XDV?
We will find out how to integrate a visual theme into your Plone site using collective.xdv in the next, practical part of this talk.
From design to Plone site. XDV-driven Plone theming.
From design to Plone site.
From design to Plone site.