Drupal Tips and Tricks

The installation, configuration and the work with Drupal obviously brings some challenges. Within this section you find some Tips and Tricks which shall help you to make your work easier.

Install the administrator menu module to save time

Drupal administrator menu module

Using the standard administration menu often requires you to click several times to get to the desired function. To make this process faster you can install the "Administration menu" which gives you a direct access to the different admin functions (drop-down menu).

Don't use style.css for CSS modifications; create an alternative file

If you make CSS modifications in the style.css, they will be overwritten if you install a new version of a theme. To avoid such problems it is highly recommended to make modifications in an alternative .css file.

Install Drupal on your local machine(s)

Installing Drupal on your local machine(s) offers you manifold advantages. First of all, it allows you to work (much) faster compared to when working online. Secondly, it offers you the perfect playground to experiment and test things.

Back up your database

Drupal module Backup and Migrate

Install the module Backup and Migrate to back up your Drupal site. This is probably the easiest way to back up and restore your Drupal MySQL database.


The best way to learn anything new is by doing. Just start working on whatever it is you’re trying to do. Start small, just do! To experiment and play around you can install Drupal on your local machine(s).

Use the Drupal module "jQuery AJAX Load" for a quick and easy AJAX integration

Drupal jQuery AJAX Load

jQuery AJAX Load is an helper module for easy loading any content using build in jQuery load function. It allows you for a quick and easy Ajax integration.

Just enable the module and add class .jquey_ajax_load to any link, URL content (without other regions) will be loaded on #jquery_ajax_load_target element. Those classes and id could be personalized to your needs. Target element coould be set on a per-link basis using the data-target attribute to define a valid jQuery ID.

Meta Tags in Drupal 8: Special elements beyond nodes/taxonomies/views

Drupal module context metadata

Meta tags in Drupal 7 was super easy: With the modules Meta Tag and Meta Tags Quick you could do anything. In Drupal 8 the module meta tag covers the standard cases but meta tags quick is not available in a usable version. So what to do?

Drupal 8: Mismatched entity and/or field definitions

Drupal 8: Mismatched entity and/or field definitions

If you get the warning "Entity/field definitions Mismatch detected Mismatched entity and/or field definitions." after upgrading (for example from 8.37 to 8.45 i.e. required security update) you have to fix this issue first before running database updates. If you don't you might get into unresolvable problems. The solution is easy.

1. Adapt index.php

Add the following script before $response->send(); in index.php file(located in Drupal root folder)

Drupal Views: Exclude current node from a list view

Drupal Views

In some situations, for example a block listing nodes related to the node being viewed, you might wish to exclude the current node from a list view.

Views 3

Drupal Rooms Availablity Search Block - Ajax breaks "Book this Room" link

Ajax overrides form action="/node-url" with action="/views/ajax"

Workaround with Drupal's hook_form_alter() for views module. See similar problem with solution here: https://www.drupal.org/node/1294164#27

The hook_form_alter() basics can be found here: http://websmiths.co/blog/very-introduction-drupals-hookformalter


Drupal themes to be compared