Web Design

Inspiration: Drupal Showcases and Galleries

Drupal logo

I've got a couple of Drupal sites I'm planning to tidy up and work on over the coming months. Ideas for these sites are currently in flux, so I'm looking around to see other sites running on Drupal, what their features are and how they've been structured and designed.

As part of my research, I've dug out some galleries that showcase live Drupal websites. Some of these contain excellent screenshots, others merely link to the sites in question. However, if you want to see the breadth of what Drupal can do, and you want to look at real-world solutions, these are great places to start.

I have listed these posts/sites in order of preference, so hopefully you'll hit the most useful resources first. And if you know of any other Drupal showcases that deserve a mention here, leave me a comment and I'll update this post.

Displaying a previous - next post link in your Drupal theme

If you're a convert to Drupal from a blogging platform like WordPress, you might miss the Previous/Next post links that allow visitors to read through the posts on your site in a chronological manner.

I've been searching for a solution to this for a while, but nothing I've found on Drupal.org has offered an acceptable solution for me. What I'm going to show you here is some code I've put together that retrieves the next and previous posts from the database and displays them for the user. If you are a Drupal guru and have suggestions for how to refine this, please share your knowledge in the comments.

GerryBot: A free minimalist theme for Drupal

GerryBot - A theme for Drupal

I promised a while back that I would make the theme I use on this site available for free download.

Well, here it is. Called GerryBot, it's  a very minimalist one-column Drupal 6 theme. The original concept behind this theme was to have as little as possible on the page to distract from the content. Some of the features are:

Give your Drupal site an SEO makeover

Drupal's currently my content management system of choice. But like virtually any CMS, Drupal needs some SEO tuning to make it more attractive to search engines.

I've set up a number of websites using Drupal, and this post will gather together some of my standard actions for optimizing. I'll try to be as exhaustive as possible on this post, starting with the basics and moving toward more complex optimization techniques.

This post, for the most part, looks at Drupal modules that can automate the SEO process for you. None of this negates the need to have an accessible theme design and to do the usual SEO activities such as building backlinks to your site. Let's get started...

Drupal: Placement of the search box makes a huge difference

I am continually making striving to improve the design of our community site, Unreality Shout. I'm quite fond of the grid-based design, but there's usually something that needs refined or improved.

A couple of days ago, I decided to move the search box to a more prominent place on the page. When I designed the site, I hastily threw in a search form as a sidebar block...right down around the bottom. I was never 100% happy about this arrangement, but my Drupal skills were weaker then.

However, I've been using Shout a lot more recently. And it started to bug me that I had to scroll to the bottom of the page to search for content. So I decided to bite the bullet and hard-code a search box into the top right-hand side of the header.

Tip for newbies: I thought I had all the code in place. But the search box failed to appear. Turns out that although I'd enabled the Search Box option in the global settings, it was switched off in my theme-specific settings. Whoops! Hopefully that's a time-saver for somebody else!

Nofollow List - An alternative to Drupal's spam link deterrent

Something I've hated about running community sites on Drupal is the cursed Spam Link Deterrent filter.

The idea behind this filter is that it applies rel="nofollow" to any links in user-generated content. And the reason this is necessary is that when you have a membership site and you allow users to create content on it, you inadvertently attract spammers who want to drop links back to their own site.

By applying the nofollow attribute, you are telling search engines not to count that link as 'editorially approved' - therefore, the spammer doesn't derive any value from the link. The problem with the Spam Link Deterrent is that it's an all or nothing solution - even internal links to other content on the site get this added to them. This means that your site loses a lot of value from natural internal links.

Drupal: Get a comma-separated list of categories (taxonomy)

Drupal's default way of displaying categories really bugs me. They compile all the categories into an unordered list, which adds a lot of pointless complexity to the theme.

Coming from the WordPress school, I'd much prefer to have a comma-separated list of categories. Well, after an epic battle with my node.tpl.php file and much searching on the Interwebs, I've come up with a solution. It's based heavily on a code snippet used in this Lullabot article.

Essentially, what we need to do is parse through all the terms, build a link for each taxonomy term and then use the implode function to build the comma separated list. Here's a sample of the code I'm using:

Design: Implement tags for web usability?

When I set this blog up, my intention was not to go overboard on SEO or anything like that, so I created a basic set of categories, none of which were particularly keyword-rich. The list of categories stands at:

  • At Home - Seldom used, was originally intended for personal stories, but I realise I rarely post those (here, anyway)
  • At Work - Originally intended as somewhere for posts about work and things I was doing in professional life. I've used this as a home for my tech tutorials as well though.
  • In My Head - A category for philosophical flights of fancy. Ironically, or fittingly, it's become a dumping ground for random posts rather than anything poignant.
  • On Blogging - Contains some good tutorials and posts about blogging.
  • On Web Design - Another favourite category containin my notes and thoughts on web design. Has some good Drupal discoveries I've made recently.
  • Unreality TV - Used for the odd update on what we're doing over at Unreality TV. Includes a good post from the Leon Jackson year of X Factor.

A minimalist Drupal theme, anyone?

If you were reading a couple of weeks back, I was musing about the effectiveness of minimalist blog designs and their impact on search engine optimisation.

The basic notion was that by eradicating all the extra stuff on the page and just displaying the page and the bare minimum of navigational links, you could improve search engine relevance and as a result, rank higher for any given search term. Why? Because, providing that the content is well written and follows the principles of good titling and semantic markup, there will be less irrelevant garbage on the page to confuse a search engine.

This follows on from the current discussion surrounding Twitter's value in terms of SEO - literally just the title and the content are displayed, along with a handful of navigational links back to the member profile.

My Experiment

I've decided to create a standard, one-column Drupal theme that only displays the content and not much else. I've left interlinking to the standard Drupal categories, but removed sidebars, Twitter statuses and anything else not relevant to the content.

Drupal Theming Tip: Show messages depending on whether the user is logged in or not.

I'm working on a Drupal theme at the minute where I need to work out whether a user is is logged in (or not) and show them a message accordingly. One such scenario is user invitations:

  1. I want to build in an invitation to become a member. If someone is already logged in, they don't ned to see this message. If they're not a user (or not logged in), I want them to see a message saying "Join our community" and providing a sign-up link.
  2. Certain pages have a wiki functionality. I want non-users to see an invitation to join up and edit, while existing members will see a message encouraging them to get involved. Slightly different messages, but both hopefully effective.

So, how does one do this in a Drupal theme? It's actually quite easy.

For older versions of Drupal, they used to recommend the following code:

<?php&lt;?php<br />  global $user;<br />  if ($user-&gt;uid) {<br />    // User is logged in.<br />  }<br />?&gt;?>

But in Drupal 6 there's a tidy little function you can use: <?phpuser_is_logged_in()?>

Syndicate content