Presentation on theme: "More than one way to skin a Plone? Or, what we learned about Plone skinning the hard way David Little, ITS Web Team 020 7631 6311 Available."— Presentation transcript:
More than one way to skin a Plone? Or, what we learned about Plone skinning the hard way David Little, ITS Web Team 020 7631 6311 firstname.lastname@example.org Available from http://www.bbk.ac.uk/its/plone/presentations/skinaplone.ppthttp://www.bbk.ac.uk/its/plone/presentations/skinaplone.ppt
Introduction Look at approach to Plone skinning weve taken. Advantages and disadvantages of this approach. What we will do in the future. Plone 2.5 only. Plone 3 a different kettle of fish.
Background Zope + CMF sites Basic, but flexible: totally custom main_template with s. Pretty much same view for public and logged in users Simple, but limited. Need for hacks to achieve functionality that comes out of the box with Plone UI. We (well, I) expected to be able to easily replicate current approach in Plone – total customisation of template with editor UI sitting nicely in the content column. Think again!
Why move to Plone? Had been keeping an eye on Plone but werent convinced (trialled early 2005 for Web Team intranet). Starting to feel limitations of Zope – wanted custom content types; more development on Plone products, less on Zope (reflected in traffic on Zope and Plone mailing lists).
Why move to Plone?  Impressed with Archetypes – investigated for a project which was later cancelled (export from proprietary CMS to Plone). Brief to create marketing microsite. Clearly definable custom content types. Didnt want to create a database or hack CMF Product level for new content types. Perfect opportunity for Plone.
Prospective students microsite Marketing microsite – available at: www.bbk.ac.uk/prospective www.bbk.ac.uk/prospective Design from design agency (Indigo Creative). Photoshop mock-ups converted to XHTML 1.0 strict / CSS. Doesnt look like Plone.
First steps towards skinning Tried to create a consistent look and feel for public and edit view of the site, with little knowledge or experience of Plones CSS structure -- really should have read Alexander Limis article on plone.org at this stage! As per Zope sites, customisations made TTW (portal_skins/custom)
Advantages of this approach  Didnt have to shoe-horn our design into Plones HTML structure / re-invent our CSS. Technology shouldnt dictate look and feel. Plones HTML is verbose. Lots of,, and tags. Works fine, but you can create a usable, accessible three-column layout more easily (which is what we did).
Advantages of this approach  Public view – cut down on amount of processing Plone has to do; e.g. remove calls for site actions, portal tabs, personal bar, Plone UI CSS/JS. Editors have access to full Plone UI for managing content, searching, monitoring workflow status of items etc. No real problem for sites with small number of skilled editors.
Disadvantages Skin structure can potentially become complex (e.g. another skin layer for scripts shared between public and admin skins). Inconsistency of view – becomes a real problem with restricted publishing – certain users log in with their details to view a page and skin switches. Problem on more devolved sites with easily confused, less technically-able editors.
Skin switching: a summary Not ideal, but not evil; especially if your public skin differs radically from Plones and you need flexibility. May be OK for a small number of editors who are known to you. More complex version of this (with staging / deployment) covered in Martin Aspeli article, Creating public websites with staging and custom skins (outdated). C.f. CMFDeployment / Entransit (alpha only). Limi – recent article: Plones future may not be in Web publishing? Revisiting the idea of Web deployment as separate from content / document management.
Alternatives : override Plones CSS Possible to use Plones template (i.e. its XHTML structure / CSS) as basis for your own customisations. Override CSS as necessary (e.g. use Firebug to identify classes and IDs you want to change). Register own stylesheets and skins via a filesystem product (e.g. DIYPloneStyle).
Overriding Plones CSS: advantages Take advantage of the best bits in the Plone template – accessibility and usability, built-in CSS hacks (good for IE6 niggles). Just override the stuff you want to change, e.g. in ploneCustom.css. It can work (have built a site more or less using this approach).
Overriding Plones CSS: disadvantages Your site may differ too much from your design = bad. Worse still, your site may look like a Plone site = worse. Design should not be determined by technology = reflects badly on Plone (and you, the developer!). You could end up with a complex CSS structure – you could potentially have a class defined in a number of stylesheets = headache. Plones CSS is MASSIVE (c.3400 lines out of the box); and youre making it even bigger = potential maintenance nightmare.
Alternatives : Pick and choose from Plones CSS Register your own stylesheet and skins. Keep Plones HTML structure – or not. But, probably a good idea to keep the same column IDs, i.e.: –#portal-column-one –#portal-column-content –#portal-column-two Plone editing UI should work fine (but be careful with your #portal-column-content styles).
Pick and choose: advantages Potentially less work (at least on CSS side, still may want to customise portlets etc.). Greater flexibility – use Plone HTML or not (with caveats). Consistency for public and admin views: less confused / irritated editors.
Pick and choose: disadvantages Inevitably will loose some of the functionality of the editing interface. Plone may still be working harder than it needs to processing calls and bringing in unneeded CSS / JS in the public view, but could be controlled with s etc. (can set conditions on CSS/JS via the CSS and JS registries).
Summary There is more than one way to skin a Plone. Approach will reflect need and complexity of project. You will be making compromises. What have others done? What about Plone 3?
Some interesting links Martin Aspeli, Creating public websites with staging and custom skins [marked as outdated!]: –http://plone.org/documentation/tutorial/staged-sitehttp://plone.org/documentation/tutorial/staged-site Alexander Limi, –Creating a new theme for Plone: a real-world example: http://plone.org/documentation/tutorial/creating-plone- themes http://plone.org/documentation/tutorial/creating-plone- themes –18 things I wish were true about Plone: –http://www.limi.net/articles/18-things-i-wish-were-true- about-plone/http://www.limi.net/articles/18-things-i-wish-were-true- about-plone/ Denis Mishunov, Making Plone theme: 10 most wanted tips [sic]. Video available from: –http://plone.tv/media/1142075516http://plone.tv/media/1142075516
Plone products mentioned DIYPloneStyle (available for Plone 2.5 and 3): –http://plone.org/products/diyplonestylehttp://plone.org/products/diyplonestyle CMFDeployment (beta only): –http://plone.org/products/cmfdeploymenthttp://plone.org/products/cmfdeployment Entransit (alpha only): –http://plone.org/products/entransithttp://plone.org/products/entransit
Your consent to our cookies if you continue to use this website.