How to get the full taxonomy term level path in the url with autopath in Drupal 7.


If you want to show all levels of the taxonomy term in the path, you can simply enter the following to your taxonomy url pattern in admin/config/search/path/patterns



Does your Drupal views combine filter appears to be case sensitive?


It seems to be an issue with MySQL wich is possible to ignore by adding the following code. Just create a module and add a hook_views_query_alter in your module:

function yourmodulename_views_query_alter(&$view, &$query) {
  // Find all combine fields and make them case insensitive.
  foreach ($query->where as $group_key => $group) {
    foreach ($group['conditions'] as $key => $condition) {

          if (is_string($condition[‘field’]) && (preg_match(‘/:views_combine/’, $condition[‘field’]))) {

            $query->where[$group_key][‘conditions’][$key][‘field’] = $condition[‘field’] . ‘ COLLATE utf8_general_ci’;

More info can be found on:

Urgently in need for a CSS solution to fix the border radius on an image in IE10?


To solve the issue where IE10 doesn’t apply the border radius on an image you need to add the radius parameter for all areas (top left, top right, bottom left, bottom right). And don’t add 0px but add 0.1px for the areas where no border-radius is needed.

For example, I only needed a border-radius-bottom-right of 20px so what I ended up doing was:

img {border-radius: 0.1px 0.1px 20px 0.1px;}

More info:


Throw away all your current stylus pens for tablets


And go buy the new pencil cause this seems to be the first real usefull stylus for Apple iPhone or iPad.

More info on:

How to solve the drush message ‘Directory …drush/cache/default exists, but is not writable. Please check directory permissions.’?


In the OSX execute the following command:

chown -R $USER ~/.drush

In case you receive the following message:
chown: ….drush/cache/default: Operation not permitted

Then execute the command again, but with sudo:

sudo chown -R $USER ~/.drush

More info can be found on

How to modify a view title in Drupal when the view returns no result


It is possible to check in a view if the no results behaviour is activated. You can do this by checking the $view->result array in the hook_views_pre_render.

* hook_views_pre_render
* @param type $view
function one_agency_views_pre_render(&$view) {
// This view contains a no results behaviour
// In case no results behaviour is activated, we need to change the title
if ($view->name == 'your_view_name' && $view->current_display == 'your_view_display_name') {
if (count($view->result) == 0) {
$view->build_info['title'] = "The title for the no results behaviour";

How to delete a content type field programmaticaly in Drupal


Delete a field within a content type
// Get the field instance object for a particular content type
$field = field_info_instance('node', 'your-field-name', 'content-type-machine-name');
// And delete it

Delete all instances of a field
// Get the field instance object
$field = field_info_field(‘your-field-name’);
// And delete all instances of this field