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.

Use the Drupal CAPTCHA module to avoid spam on your website

A CAPTCHA is a challenge-response test most often placed within web forms to determine whether the user is human. The purpose of CAPTCHA is to block form submissions by spambots, which are automated scripts that post spam content everywhere they can. The CAPTCHA module provides this feature to virtually any user facing web form on a Drupal site.

Theming contact form:

#contact-site-form fieldset {
border: none;
}

Customize your site’s error pages

The default error messages Drupal gives your users when they navigate to a web page that they don’t have permission to view or a page that is not found can be intimidating and not really useful. Thus you have the possibility to configure specific Error pages.

Drupal Error Pages

Use Google Analytics to increase traffic

Google Analytics gives you fresh insights into how visitors use your site, how they arrived on your site, and how you can keep them coming back. Understanding your visitor will help you to optimise your site and to increase the number of visitors. For an easy implementation you can use the Drupal module Google Analytics. The Tutorial below offers you step-by-step instructions to do so.

Use Google Analytics to increase traffic

Always verify/enable clean URLs

Usually "clean URLs" URLs is enabled by default with the installation of Drupal. Frequently it happens, that it can't be enabled. Then the URLs will look like "example.com/?q=user." instead of "example.com/user" i.e. they won't be clean. The most common reason is, that the .htaccess file is missing on the root directory of Drupal.

Drupal Enable clean url

Google is your best friend

If you have a problems or questions related to Drupal it is usually very easy to find the required help online. Copy and paste the exact error message, and consider putting the search term inside double quotes so that Google does a literal search. Alternatively you can ask a question like "How to create a sub theme in Drupal".

Google example search for Drupal "How to create a sub theme in Drupal"

Use Browser Shots to test the browser compatibility of your Drupal website

Browsershots makes screenshots of your web design in different operating systems and browsers. It is a free open-source online web application providing developers a convenient way to test their website's browser compatibility in one place. When you submit your web address, it will be added to the job queue. A number of distributed computers will open your website in their browser. Then they will make screenshots and upload them to our central dedicated server for your review.

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

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.

Drupal jQuery AJAX Load

Ask questions

If you have a problems or questions get help from the Drupal community. Ask questions on drupal.org/forum or on famous howto sites such as http://drupal.stackexchange.com/.

Drupal Answers

"Clear all caches" when something goes wrong

During the development of your site it might happen, that you can't see changes in your browser or that the site acts strangely. Frequently the problem can be very easily solved by clearing the cache. To do so go to Configuration > Development > Performance and press "Clear all caches".

Drupal Clear Cache

The handy Drupal 8 module "Quick Node Clone" allows you to clone nodes easily

Are you looking for the successor of Node clone?

The Drupal 8 Quick Clone module works very similar as the Drupal 7 Node Clone module. The quick clone module allows users to make a copy of an existing item of site content (a node) and then edit that copy. Doing so the authorship is set to the current user and the menu and url aliases are reset.

Clone

Pages

Drupal themes to be compared