drupal
Related nodes and custom breadcrumbs
21 August 2009 - 16:38Sometimes, having an easy to use CMS like Drupal or Joomla is just one more excuse to keep on tweaking. Just now I added a related nodes block to the article and project pages. Let's say I write an article like this and I tag it drupal. A couple other articles on the same topic are shown in a block in the right column. Hard to do? I don't think so! Just use the views module an some view arguments, like so.
There's more stuff I changed in the last week or so. I completely changed the functionality of the breadcrumbs. I wanted them to reflect the structure I use for clean urls. But I wanted to use page titles instead of the url shorthand (and lowercase) terms. So I created a little snippet. Let's say I have an project with a fairly simple url like /projects/world-domination.
- first I fetch the url and system path
- then I breaks it up in into parts using the / as divider (so I have 3 parts: /, /projects and /projects/world-domination)
- for each part I check if the url is pointing to a valid page.
- for each valid target page I fetch the page title
- then I return all the breadcrumbs with valid links back to the theme
- If the clean url path wasn't found, the normal system breadcrumbs are used as a fallback mechanism
and... Presto! A simple breadcrumb bar for all the project nodes. Including "Home" and the current page's title. Off course I needed to find other solutions for Views, Taxonomy, System paths, etc. but that's a longer (and even more boring) story. I anyone's curious how I did it. I'll send them the code.
SEO and performance
21 July 2009 - 14:46Discussions on Drupal site optimisation are usually technical discussions. But many a time they boil down to philosophical discussions. Search engine optimisation (SEO) and performance tweaks aren't necessarily good for the manageability of your site or for your potential visitors. I ran across a couple of these dilemmas in recent days while trying to optimise my own site.
JS / CSS compression
On of the questions I struggled with is: "should I compress the javascript and css files?". From a performance perspective, the answer is a clear yes. The performance boost is minimal because the servers of my hosting provider have ample headroom. But any performance gain helps. I manage to reduce the number of http requests by 18 simply by combining all the css and js files into 1 file for js and 1 for css. However, because I still do lots of front-end development, I want my own website's css files to be readable by potential clients. If prospects want to judge my css coding skills they'll probably want to take a look at this site's css code to. Compressing the files also makes them very hard to read. And all the care I put into laying out the code neatly (alphabetical element properties, consistent commenting, consistent tagging, etc) is lost for the potential observer. Right now I decided to enable this performance tweak because the potential number of observers is really limited.
New Layout
14 April 2009 - 01:05Code Culture has a brand-spanking new layout. My wonderful friends Leon and Rob from WAT Ontwerpers have concocted a colourful corporate identity, logo, and website design. The drupal theme for this website, I built myself. Though this is still a work in progress (and it probably will be a work in progress for the remainder of it's life), many of the elements of the new design are in place. Let me point out some highlights:
- The logo can be placed over any image and still retain it's expressive power. The header image can be altered to match a specific section's topic or style.
- Good old Helvetica is serving some nicely layed out text styles. Most (semantically relevant) html text elements have been molded to a calm well readable rhythm. Blockquotes, links, linespacing, indenting, lists, etc have all been carefully layed out.
- We have minimised wasted space by wrapping the text under the right column.
- To further demarcate sections and whitespace, we've added some nice supportive visuals to the layout.
- And don't forget the stuff most of us never see! Browser text resizing and print styles have been optimised.
- Cross browser support: the template has been tested in firefox, opera, safari, ie6 and ie7.
E-Connection
2 December 2008 - 19:30My coworkers at Tressis and me have created another green site. The website's layout is mainly blue, but the client is green at heart. E-Connection is a company that starts projects in sustainable energy, specifically wind energy. You could say they are a typically Dutch company, since they deal in wind mills. In their own words:
E-Connection initiates and realises complex and innovative projects with a substantial positive environmental impact, in particular renewable energy projects. Furthermore E-Connection undertakes related, innovative and supportive research on this subject. E-Connection comprises a small group of highly qualified professionals, who are able to put together all disciplines required to realise said projects.
Hier mag het wel - Roken in de Horeca
14 November 2008 - 13:37Sinds een maandje of twee is de site Hier mag het wel in de lucht. Het project is een initiatief van Tressis. De site is een zoekgids voor horecageledenheden waar je (legaal) mag roken. Als een café een verwarmd terras of aparte rookruimte heeft komt ie in aanmerking voor opname in de gids. Zo kunnen rokers en niet-rokers makkelijk een gezamenlijke avond buiten de deur plannen. Deze weken wordt er ook gestemd voor de Revu Rookpluim. Samen met weekblad Revu nomineren we de beste horecagelegenheid waar je mag roken per provincie. Je kunt 1 keer stemmen op de horecagelegenheid die jij het beste vindt. De resultaten worden gepubliceerd in de Revu.
Particuliere Windturbine Exploitanten
29 May 2008 - 11:40Nederlandse Wind Energie Associatie
29 May 2008 - 11:34De nieuwe website van de Nederlandse Wind Energie Associate (NWEA) is vandaag gepresenteerd. De vernieuwde website heeft een volledig opgefrist design en draait op Drupal. Met deze overstap naar het drupal cms is er een fatsoenlijk nieuw datamodel geïntroduceerd en is er een ledenlogin, met afgeschermde ledensectie, een nieuwsbrief en archief. Bovendien is alles geïndexeerd in een zoekfunctie en geoptimaliseerd voor search engines.
Jumbo
29 February 2008 - 14:08Gisteren is de nieuwe website van spellen- en puzzelfabrikant Jumbo online gegaan. De nieuwe site is overgezet van een custom cms naar Drupal. Ik heb een groot deel van de ontwikkeling voor m'n rekening genomen in opdracht van Tressis BV. De vormgeving van de site is (nagenoeg) ongewijzigd. Dat lijkt prettig maar betekent in de praktijk dat de infrastructuur van de oude vormgeving opnieuw ontwikkeld moet in een drupal template.
Van Gogh by Van Eck
12 July 2007 - 22:32Vorige week is de migratie van Van Gogh by Van Eck afgerond. Ik heb in opdracht van Tressis een Drupal template van de originele website gemaakt. De site bestond uit platte html en is nu door de klant zelf eenvoudig te onderhouden mbv een cms.