I’ve included my (hastily written-up) notes from the SuperMondays talk I did last week (Slideshare link), entitled ‘CMS design/integration’ (original, I know!).
- Introduction
- Creative Director at Peacock Carter Ltd, a Newcastle-based web design agency
- Author of 4 books in theming:
- Magento 1.3 and Magento 1.4
- MediaWiki
- Joomla! 1.5
- Technical reviewer on more:
- Drupal 7 (x2)
- MediaWiki
- Inkscape
- Experience with below too:
- ModxCMS
- Drupal
- WordPress
- What is theming?
- Taking a static template – (X)HTML/CSS, possibly JavaScript – and integrating that in to a specific software package – a CMS, ecommerce package
- To me, it bridges the gap between web designer, frontend developer and, sometimes, a little towards backend developer too
- Topics to promote discussion throughout the rest of this talk. Base themes:
- Concept, as seen in Magento
- Base theme encapsulates everything needed for the software (e.g., ecommerce) to ‘run’ visually
- Then create an overwrite theme which overwrites specific elements you want to customise
- Good for upgrades – you can upgrade the core components of the software – base themes included, probably – and in the worse case scenario only have to rewrite your changes to the base theme
- Concept, as seen in Magento
- Base themes II
- Examples of ‘base theme’ implementations
- MediaWiki: common.css – single stylesheet you import you defines style for common elements – e.g., user bar, page tools
- WordPress – ‘base’ themes such as ‘Starkers’ by Elliot Jay Stocks – but these are more for copying and pasting than overwriting
- Magento – the ‘truist’ base theme implementation I’ve seen
- Examples of ‘base theme’ implementations
- Abstraction
- I want to see as little logic as possible in template files (sort of). Why? It helps themers focus on mark-up rather than the intricacies of where a particular block of content is coming from
- What follows are examples of how various open source CMS/ecommerce/etc platforms implement something as simple as populating the <title> element
- WordPress example
- No! Just nasty
- MediaWiki example
- Getting better – my designer sensibilities aren’t too offended by this
- ModxCMS example
- A good balance?
- Separated parameters for the site name and the title of the page – you can reorder them as required
- But, is this our choice as themers, or the end users’ choice?
- Joomla!example
- Navigation is in this block, somewhere
- Gives the user more control
- Magento
- Similar to the Joomla! example, defined elsewhere.
- Can overwrite through XML layout files – and remove/add stylesheets/scripts
- So, I said as little logic as possible, but I’m also awkward.
- Whilst I don’t want logic as a themer, I do want choice: the ability to change how data is formatted if a particular element of the theme is better suited to it
- Granularity in theming can provide abstracted control to themers for this very purpose, and it can be done without resorting to huge amounts of logic
- How many people have themed/tried theming? How many people have got 95% complete with a theme, only to find that the last 5% they need to change is nearly impossible? E.g., to add your own custom id to an element within a predefined element which can be hardcoded in a block of output HTML
- (Of the people who put their hands up for the first question, all hands remained up for the latter)
- As an example, let’s look at how various systems implement populating the navigation
- MediaWiki example
- (For those wondering, the Sky Sports style pint glass meant we were halfway to beer at the Trent House)
- This doesn’t give us enough control
- MediaWiki example (II)
- But luckily, MediaWiki outputs the list items with (semi)unique ids assigned to them
- ModxCMS example
- A contained block, with little control here…
- …but the bottom code block can be used in a template to overwrite the predefined output and append a unique class/id to the list item
- A good balance – sensible defaults with the option to overwrite them if required?
- Drupal example
- Similar to Modx; can be overwritten in a template file
- So, where do we draw the line in what a themer should define, and what a user should be able to define? The simple answer: who knows? It depends on the:
- project itself
- the technical ability of the end-users of the CMS/ecommerce system/etc
- the client’s budget (doesn’t it always!)
- Drupal 6 example:
- Generated output from Drupal 6 module ‘panels’, courtesy of @philsherry
- 22 nested <div>s! Possibly to make it ‘robust’ to theme…but it’s <div> overload
- Duplicated classes within nested <div>s (e.g., .inner)
- Generated output from Drupal 6 module ‘panels’, courtesy of @philsherry
- Drupal 6 example (II)
- Software automatically adds a class of .first, .last for the relevant list item in the navigation block
- There’s also overlap in how we as designers can control things.
- …because we can control the style here through CSS such as this
- The CMS problem
- We create nice mark-up for our clients’ sites, only to have it destroyed by output from Rich Text Editors (RTE)
- Jeremy Keith at DIBI 2011 (Design It Build It conference) summed this up nicely as WYSIWTF (What You See Is What The Fuck)
- Here’s an example from a website using TinyMCE: nested <span>s, <font> (!) and even nested <p>s?!
- And they overwrite our style inline, too. Is this too much choice for the client? I would say yes!
- Portability
- Ability to port theme/template/skin from one software to another (e.g. Joomla! to Drupal), or even between software versions (e.g., Drupal 6 to Drupal 7)
- Magento 1.3 to 1.4 – forum post which says ‘start again’!
- An ideal that’s unlikely to ever be reached. Plus, it’d put themers out of a job!
- Documentation
- Problem in open- and closed-source systems
- This is an example from Magento’s website. Very long page…and nowhere does it say it’s largely irrelevant to the most recent version of Magento!
- But then they are starting to sell guides on everything Magento
- Documentation II
- Example from the WordPress Codex; well integrated wiki – you can correct mistakes, add to it from your experience.
- Magento has a wiki, but it’s poorly integrated
- Few things I could have gone in to more detail about:
- Layout control
- What’s the best way to define and control different page layouts? Again, is it the themer’s or end-user’s choice?
- What’s the best way to control widgets and changing where they appear on different pages, if required?
- I think the answer is it depends who the client is (and their budget, of course)
- Scalability
- ‘Future proof’ themes
- What happens if your client decides to install a module; is at least the basic styling for that covered by your theme?
- Base themes come in here, to some extent
- Some systems (e.g., Drupal), simply import another stylesheet with a module, if required
- Layout control
- Plug for Drupal North East