Drupal Planet

Adding color support to a Drupal theme allows site owners/administrators to modify the theme's color scheme directly from a settings page, rather than having to edit any CSS.

I'm currently assessing color integration options for Neptune and have found DesignKit to be a quick, easy, and flexible alternative to direct color module itegration (as used by Garland and Bartik). On the flip side, there are a couple of caveats (see below).

This tutorial will focus on implementing basic color configuration, although DesignKit also supports image configuration and more advanced color configuration (including color blending/shifting).

A couple of weeks ago now I released the 1.0 version of Neptune, a new Zen 7.x-5.x sub-theme. Since then I've fixed and added a number of bits and today created a recommended 1.1 release. You can see the theme in action at the demo site.

Key features include:

Responsive design

HTML5 based

Sass/Compass integration

Single or multi-column layout

Configurable max width

Mobile friendly mini nav

Google web fonts (Montserrat for titles and Istok Web for all other text)

When theming Drupal and wanting to output a view there are occasions where using a view display (e.g. a page, or a block - perhaps placed within a custom region ;-) ), or using Views Attach will not suffice.

Instead, you can embed a view using the following PHP snippet:
(NOTE: you'll need to have the core PHP input filter enabled if embedding in a node body)

It appears that I missed the very obvious solution to this problem (!) which, as pointed out by a couple of commenters, is to use the ‘Trim this field to a maximum length’ option within the settings for the node title field.

I’ll leave this post in place as I think it still serves as a useful guide on how to create template override files for views, but please be advised that for implementing truncation of a views node title it is easier to:

Previously, I covered the topic of creating custom regions in Drupal 5 themes. However, Drupal 6 introduced a new process for creating custom regions in themes and it is still one of the topics people ask about most frequently.

So, here's a tutorial on how to create custom regions in your Drupal 6 themes. In this example I will use the Garland theme, and insert a new region called 'Uber content', which I'll position above everything in the main content area.

It's basically a two-step process:

step 1 - define the custom region in your theme's .info file

step 2 - insert some PHP in your theme's page.tpl.php file wherever you would like the new region to appear

However, try adding that to the default 'Footer message' area and it will simply output the entirety of the code as text, ignoring the PHP tags.

So, what to do?

Solution 1:
Create a block (admin/build/block/add) containing the code, set its input format to PHP, and then place that block in the footer region via the main blocks settings page (admin/build/block). Crazy simple.