Development

Creating Custom Content Panes via code [Drupal 7]

For whatever reason there doesn't appear to be a lot of documenation around on defining Custom Content Panes within code.

custom_content_panes.png

Ordering blocks across multiple contexts while using Context module in Drupal 6

The Context module is great and does a lot of things. Web Omlette has a good summary of using the Context module for block administration.

One issue with the Context module comes when you have multiple contexts adding different blocks to the same page. An example being:

Context A places blocks 1 and 2 in the left sidebar.
Context B places blocks 3 and 4 in the left sidebar.

Although you can order the blocks in each individual context, you can't easily order them (you can apparently do so if you use the inline context UI rather than the admin one) when combining contexts.

If page X matches both context A and context B it can be a bit of a mess in terms of the order of the blocks. You are most likely going to end up with A1, B3, A2, B4 but this isn't guaranteed.

Drupal Views Nivo Slider - Display original image rather than Imagecache style - Drupal 6

The Views Nivo Slider which allows you to create views which display using the Nivo Slider.

An issue I have had as well as other people (albeit in Drupal 7) have found that the module forces you to use an Imagecache preset. With a slideshow you are generally going to upload the right size image and don't want additional processing to be done on the image from PHP GD or ImageMagick.

Creating an 'express checkout' in Drupal Commerce

When you have a site which sells a single product the whole cart process seems all a bit too much especially as the cart adds nothing to the experience other than an additional screen and click which if anything will frustrate users.

Aten Design Group have a great little guide on the required steps to do various tasks. Although the post was written in 2011 it still applies to the latest version of Drupal Commerce.

UK Geocoding and mapping in Drupal 7

Geocoding UK addresses has always seemed to be a pain especially outside of Drupal. With Drupal 7 a few of the mapping/location modules that I have been used to using in Drupal 6 are either not available as a stable release or don't quite do what I wanted. A key example is Location which I have used on a Drupal 6 with which geocoding has never worked (I still don't know if it is something that should work out the box, it certainly seems to imply to me.)

A rash of new Drupal 7 modules has made the process a lot easier though.

Anchor CMSs custom CSS and javascript comes to Drupal through Code per Node

Anchor CMS is getting more attention as of late with one of its key features being able to add custom javascript and CSS per blog post. This allows a lot of custom design to take place which differs per page. An example of this can be found on the creators blog.

Drupal is lacking this feature, but as is the way with Drupal, "there's a module for that". Code per Node does this and more allowing you to add custom CSS and javascript to both blocks and content types as a whole rather than individual nodes.

Drupal 8 dev thoughts

Having just installed the Drupal 8 development version on to a local test site, it has raised a few thoughts.

Of course a lot of these could be fixed or the majority may disagree but either way. We have a long time before Drupal 8 will be shipping and as such have a lot of time to sort out any problems.

"Cannot redeclare class themeregistry" when trying install Drupal 7

When attempting to install Drupal 7 on a server which has a few Drupal 6 installs running without a problem I got a white screen of death after selecting the profile I want to use.

Looking in the log file were quite a few lines stating:

[Wed Feb 08 10:19:55 2012] [error] [client 78.86.177.75] PHP Fatal error: require() [function.require'>function.require]: Cannot redeclare class themeregistry in /var/www/microsites/www/includes/install.inc on line 1120

The problem turned out to be an issue with an APC configuration.

Adding color module support to your theme in Drupal 7

I have been playing about with creating my own base theme which I can use to easily roll out new sites quickly and easily for those who don't want to pay for a bespoke design.

The main problem with this is ending up with one theme for all, to get around this with out having to do any development work is use Drupal's core colour module which allows the user to select the colours of certain areas.

This will just show you the basic code that is required for use with a theme using the PHPTempalte engine with some comments on what the code is doing at parts.

Sorry but I will be using the English spelling, too used to typing with the 'u'.

Creating custom pane styles in Drupal 6

In Panels you can change the style of panes very easily using some presets from the Panels module.

panels-2.jpg

This tutorial will show you how to define your own styles as well as add a settings form to it so you can allow users to further configure the styling of the pane.

panels-3.jpg

Pages

Subscribe to Development