Nomads in Oman
I've been wanting to use collective.xdv on a couple of projects I've been working on as a) it seems like a sensible approach to Plone theming and b) the thought of playing around with all those portlet managers and zcml code again makes me want to sob.
As anyone who's played around with xdv will know, getting it to install is not the easiest thing to do. Having said that I've managed to get it working on OSX (both Leopard and Snow Leopard) after following the documentation, and even got it working on Windows. After these minor triumphs I thought actually installing it on my Ubuntu web server (running Ubuntu 8.04) would be a breeze. Not so.
I followed the general install instructions on plone.org to get xdv set up but buildout tripped over when trying to install lxml. So, no xdv. Ok, so I followed the instructions for installing on OSX and added 'lxml' to the parts = section and used the static lxml recipe à la OSX:
[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml
force = false
This time lxml installed and buildout ran. But, when I started up Plone I was unable to add a new Plone site, getting this error:
('No traversable adapter found', {'extension_profiles': ({'product': 'kupu', 'description': 'Kupu is a cross-browser visual editor.', 'for': , 'title': 'Kupu', 'version': u'1.4.16', 'path': 'plone/profiles/default', 'type': 2, 'id': 'kupu:default'},), 'args': (), 'base_profiles': (), 'default_profile': 'Products.CMFPlone:plone'})
After posting to plone-users with this and the zope debug traceback, Martin Aspeli isolated where the problem was occurring and suggested clearing out my buildout-cache(s) before trying again.
In the meantime I stumbled across this page describing how to install Deliverance on Ubuntu 8.04 and 9.04. This suggested that on Ubuntu 8.04 you need to use libxslt1-dev as part of lxml as opposed to libxslt-dev. So, I gave this a try which worked.
In summary here's what I did to get it working:
When I started up Zope I was able to add a new Plone successfully and install xdv.
The irony of all this is that xdv is supposed to save designers and integrators time (and sanity) when theming a Plone site. However, getting it running has actually cost me a big slice of time I don't really have. Due to the problems I had I more or less decided to abandon Plone and use Wordpress for one of the sites I'm building.
Postscript 23.02.10
Martin Aspeli responded to my plone-users email with this:
I'm glad you got it working. However, the staticlxml recipe is *supposed* to download and compile static versions of libxml2 and libxslt, so your system-wide ones shouldn't matter.
Out of interest, did you actually try to do what I suggested, or did you go with the other option first?
So, it is possible that the libxslt1-dev option is a red herring. Having said that, although I can't swear to it, I'm pretty sure I did clear my buildout-cache when running my original tests. It may be worth ensuring that you do as Martin says first before trying my solution.
Postscript 03.08.10
Re: Martin's Tweet -- yes, I agree -- of course it would have been helpful for me to include some signposting for people who need any further help with this. Apologies for not doing so.
The best place to start if you have any problems getting XDV up and running is the Plone Users list -- they've been very responsive in helping me out with my problems -- so many thanks as always to them.
Also, if you haven't already please check out Theming with collective.xdv on the plone.org site.
Veda Williams' Plone 3 Theming (Packt, 2009) [Amazon UK | Amazon US | Packt] is a useful reference for anyone involved in customising the look and feel of their Plone-based website. Used alongside the various online resources on the plone.org website, particularly the Plone Theme Reference, it should ease most of the pain that Plone themers experience. Unfortunately (and this is not a criticism of the author), the book is let down by some poor copy-editing. It also contains a number of errata, which the author is gathering on the plone.org website.
The book is broken down into fifteen chapters, the most useful of which I found were chapters seven to twelve which deal with the day-to-day business of Plone theming. These chapters cover customising viewlets and portlets, an overview of the Zope templating language ( ZPT), the creation and installation of a Plone theme, template changes, custom page views and theming tips. Although I've done a fair amount of Plone theming, I still find it quite esoteric and complex so it's certainly very useful to have these chapters to refer back to.
Chapter fifteen, written by Alex Limi, gives an overview of the future of Plone theming using products such as collective.xdv and Deliverance. These seem an ultimately saner way to proceed and should allow non-Plone specialists to theme a site without getting too bogged down in Plone specifics. This article is also freely available on the Plone website where it will be updated as the project develops.
I did wonder if the second chapter was really necessary -- this provides an overview of the main graphic design, browser and text editing tools. I imagine that most web designers and developers already know about these and the complete beginner would be encouraged to to stay away from Plone until they are a little more experienced.
That aside, the only real complaint I have about the book is the quality of the copy-editing. I think the text would in places benefit from a little slimming down or rephrasing. I occasionally struggled with some of the explanations , although it must be borne in mind that Plone 3 theming is complex so is by its very nature difficult to explain in simple terms. Some other examples: it's probably not necessary to have sentences like, "now what, you ask?" in a tutorial book and I'm not sure why there is a lengthy code sample from Plone 2 on pages 129-30 which is really only produced to show how things were done the "old way".
Anyone who has been involved in Plone theming will know how hard Veda Williams has worked on it: in addition to this book, she coordinated the Out of the Box Plone Themes project. For her work I'm sure she has the gratitude of every Plone themer. Hopefully subsequent editions of the book will address the editorial issues and errata.
if (navigator.userAgent.indexOf('Opera')>-1) {
swfurl = '&dtml-portal_url;/path/to/flash/myflash.swf' } else {
swfurl = '&dtml-portal_url;/path/to/flash/showflash?flashvid=myflash.swf'
}
swfobject.embedSWF(swfurl, "my-dom-id", "435", "290", "9.0.115");