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 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.

"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

Use these Modules

I use these modules on almost every Drupal site I build: Views, PathAuto, References, Display Suite, Panels, Chaos tool suite (ctools), BUEditor and Backup and Migrate.

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.

Use Disqus to build an active community

Usually it is essential for the development of a website to encourage user interaction. If you use the standard Drupal function “Comment” you will quickly realize that it is nice as a start but very limited too.

If you want to use an advanced service to build an active audience commenting your content I recommend you disqus.com: Disqus is a comments platform that helps you build an active community from your website's audience. It has awesome features, powerful tools, and it's easy to install.

Troubleshoot error message after update/installation of module/theme with "undo"

Occasionally it might happen that you get an error message or even a fatal error after updating/installing a module or theme. If so, try to undo the recent changes first.

Issues page for Drupal Views

Use distributions for a quick installation

The classical way to install Drupal, is to download and install the latest Drupal Core from drupal.org. If you want to save time, I recommend you to get familiar with the Drupal Distributions, which make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.

Drupal Distributions

Offsetting an html anchor to adjust for fixed header

You could just use CSS without any javascript.

Give your anchor a class:

<a class="anchor" id="top"></a>

You can then position the anchor an offset higher or lower than where it actually appears on the page, by making it a block element and relatively positioning it. -250px will position the anchor up 250px

a.anchor {
display: block;
position: relative;
top: -250px;
visibility: hidden;
}

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.

Install the administrator menu module to save time

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).

Drupal administrator menu module

Pages

Drupal themes to be compared