• Save
From design to Plone site. XDV-driven Plone theming.
Upcoming SlideShare
Loading in...5
×
 

From design to Plone site. XDV-driven Plone theming.

on

  • 5,563 views

Slides from Denys Mishunov's talk at Plone Conference 2009 in Budapest

Slides from Denys Mishunov's talk at Plone Conference 2009 in Budapest

Statistics

Views

Total Views
5,563
Views on SlideShare
5,242
Embed Views
321

Actions

Likes
3
Downloads
0
Comments
1

4 Embeds 321

http://deliveranceproject.org 196
http://www.deliveranceproject.org 88
http://www.slideshare.net 36
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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. <br /> <br /> 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. <br /> <br /> 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&apos;s where we&apos;re heading with that in Plone 5. <br /> <br /> 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? <br /> <br /> 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. <br /> <br /> Faster sibling of Deliverance. <br /> <br /> 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. <br /> <br /> 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&apos;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. <br /> 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. <br /> <br /> 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. <br /> <br /> 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. <br /> <br /> You might consider using collective.xdv if: <br /> 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. <br /> 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. <br /> <br /> You might consider trying another tool if: <br /> <br /> If you already have a Plone theme done, switching to collective.xdv will not gain you anything. Stay where you are. <br /> 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. <br /> <br /> 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. <br /> <br /> There is one advise though. <br /> 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 <br /> <br /> <br /> You specify a piece of content in your Plone site and an HTML element in your static theme which XDV should glue together. <br /> <br /> 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. XDV-driven Plone theming. Presentation Transcript

  • From design to Plone site. XDV-driven Plone theming Denys Mishunov Jarn AS
  • From design to Plone site. XDV-driven Plone theming Denys Mishunov Jarn AS
  • This is Painful
  • even this is painful
  • Deliverance
  • XDV (XSLT Deliverance)
  • XDV vs. Deliverance
  • collective.xdv
  • XDV XML HTML Rules
  • <copy content="//*[@id='portal-footer']/*" theme="//*[@id='footer']" />
  • <copy content="//*[@id='portal-footer']/*" theme="//*[@id='footer']" />
  • <copy content="//*[@id='portal-footer']/*" theme="//*[@id='footer']" />
  • <copy content="//*[@id='portal-footer']/*" theme="//*[@id='footer']" />
  • • Theme without Plone; • use any HTML/CSS • no main_template dependancy • migrate without a headache
  • Practice
  • (Plone) content (Static) theme BEFORE
  • (Plone) content (Static) theme DROP
  • (Plone) content (Static) theme REPLACE
  • (Plone) content (Static) theme PREPEND
  • (Plone) content (Static) theme COPY
  • (Plone) content (Static) theme PREPEND APPEND
  • (Plone) content (Static) theme AFTER
  • Creampuff NF Creampuff NF Creampuff NF Creampuff NF
  • Nick Curtis
  • Questions