Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
May 06 2021
May 06
Quick Tabs Module to add tabbed content in Drupal

The Quick Tabs Module

is handy when there is a need to add tabbed content and the possibility to switch between content displayed on your web page.

This blog post is  entirely devoted to the Quick Tabs Module, how to add tabbed content and what benefits you will get from creating tabbed content on your Drupal website. The Drupal support team does not guarantee that you will become a professional after reading the blog, but you will definitely get the basics.

Apr 28 2021
Apr 28


Before you download a module in Drupal 8, make sure it will be compatible with your Drupal 8 version. You cannot install a Drupal 7 module into Drupal 8 installation if it is not supported. In Drupal.org, to know the module version released by Drupal.org, navigate to the module's page and scroll right to the end.

Actively Maintained Modules

You need to check and verify that the modules you have chosen are actively maintained, updated, and published by the developers. Suppose you encounter any security vulnerabilities or any other issues while developing.

You will get an instant response from the developer/contributor. In Drupal.org, to know the module version released by Drupal.org, navigate to the module's project page and scroll right to the end.


Make sure to choose popular modules to do the job, as you will get more minor issues while developing. To check this, go to the module's project page on drupal.org. Here, you will see the number of downloads and the number of websites currently using that particular module.

Now that you have chosen the module for development let's get started. In Drupal 8, the modules folder hosted in the root directory of Drupal 8 is where you will find the contributed or custom modules.

Things You Should Know Before Beginning Drupal 8 Module Development

Apr 27 2021
Apr 27

Now that you have enough reasons to migrate to Drupal 8 or 9 from Drupal 7. We have listed out ten essential things that you should remember before you begin the Drupal 7 to 8 migration:

Migrate from drupal 7 to drupal 9

1. Observe and Plan

For a smooth Drupal content migration, first Identify the content types and structure of the existing site and note down the observations. Note down the field types, blocks, content types, taxonomies, etc.

Note down what you need to migrate and what you need to merge based on these observations. Check the Views and other site configurations and note them to replicate them in Drupal 8.

2. Create a checklist of Drupal 7 website modules

First, identify modules that you still need, or if the Drupal 7 module has moved to Drupal 8 Core. keep in mind that not every Drupal 7 module is automatically migrated to Drupal 8. Some of the Drupal 7 modules may have put their functionality into a single Drupal 8 module, and some may have separated their features into two or more Drupal 8 modules.

3. Update to the latest available version

Update your Drupal 7 to the latest available version of Drupal 8 or 9. It will ensure cleaner automatic upgrades of Drupal 7 modules with direct Drupal 8 or 9 upgrade paths.

4. Access.

Before migration, make sure you can access the Drupal 7 website's database and files - both public and private.

5. Backup your website

Before you start the Drupal 7 migration process, make sure to create a backup of the Drupal 7 website and use it for the Drupal 8 migration. Although the Drupal migration does not modify the source, It is still not good to migrate a live functional website.

6. Download a fresh installation

Download a fresh installation of Drupal 8 and again, remember, it MUST be FRESH! If you have done configurations or created content, it will be overwritten automatically when a Drupal 8 upgrade is performed.

7. Familiarize yourself

Unlike in previous version upgrades, you cannot perform a direct upgrade from Drupal 7 to Drupal 8. Drupal 8 Migrate module, Drupal 8 Migrate Drupal module and Drupal 8 Migrate Drupal UI module are three modules in Drupal core. You need to familiarize yourself with Drupal 8's migration system and configuration.

8. Decide the choice of migration

Drush (which gives you granular control) browser user interface (more accessible but less control) are two of the choices you have. You can opt for the method that suits your familiarity level and experience.

9. Know your source

The flexibility of the Drupal content migration system allows you to extract content and load from older versions of Drupal and other sources like CSV, XML, JSON, MYSQL, etc.

10. Perform a content audit

Perform a thorough content audit on the Drupal 7 version to identify content you need to migrate to Drupal 8 or 9. For a smooth Drupal content migration, remove the unused and irrelevant content to avoid spending time and effort migrating them.

Also Read: Custom Drupal Development: 10 Things You 'Must' Know For Best Output

Apr 26 2021
Apr 26

Drupal 7 is generally not quite the same as Drupal 8 and Drupal 9. Many structural changes that progress from a Drupal 7 website to a Drupal 8 are more like a relocation project from an unexpected CMS than a product redesign. For instance, the brand new theme and PHP library in Drupal 9 are features that attract most of the Drupal CMS owners.

Drupal Website Development

Fortunately, there is no large building hole between both Drupal 8 and Drupal 9.

Drupal 9 in reality, more like a next minor center overhaul like 8.8 to 8.9 with some newly added features. Remember when you upgraded Drupal 7 to Drupal 8 that led you to rewrite the Drupal from scratch? Don't be scared; Drupal 9 offers the easiest upgrade from Drupal 8. Since Drupal 8 is backward compatible, you will not have to write custom codes after upgrading. If you practice removing the old and deprecated code base, upgrading from Drupal 8 to Drupal 9 will be smooth as butter.

If you are still using Drupal 7, it will reach the end of life by November 2021. To avoid it, you can upgrade your Drupal website to Drupal 8 or Drupal 9. To help you do a smooth upgrade, here is a comparison guide for Drupal 7 Vs. Drupal 8 Vs. Drupal 9.

Drupal Features

Apr 23 2021
Apr 23

Drupal 8 is loaded with several built-in languages ​​to save time and effort for users using Symphony, which has an underlying element called translation, which can create multilingual sites and help you show the site content in multiple languages. Using Symphony, you can translate everything from content to blocks to menus to taxonomy. You can even translate user profiles, image styles, views, text formats, comments, and feeds on your website. In short, Drupal 8 provides the entire site translation.

Apr 22 2021
Apr 22

Custom drupal development methods vary from version to version in Drupal. The one method used in Drupal 7 might not work for Drupal 8. Here are some of the crucial things to keep in mind for the best output of custom Drupal development:

1. Use Configuration Before Code

To avoid hard-coding a class into a theme, make sure to set the values in the configuration and use it with the code to avoid rewriting the code every time you have to make changes. Once you set the value in the configuration, it gives you advanced functionality and "easy to modify" features. It also enhances coding speed and results in high-quality modules.

2. Limit The Usage Of Modules

While working on enterprise-level Drupal websites, it is essential to use fewer modules. Avoid using every single module which is lacking. Experienced developers are in favor of programming their modules rather than reusing the existing ones. A higher number of custom modules will demand more work in the future to maintain and modify your Drupal site. Publish your modules on Github, which helps you avoid using a larger number of custom modules and encourages you to create reusable code with the required configuration.

3. Environment & Coding Standards

Most of the Drupal development companies work in the same development environment to ensure efficient workflow. In such scenarios, the biggest issue is to make sure that the produced code is clean and reliable; the code should make sense to their team members and the larger Drupal community itself. With the Drupal community and distributed teams working together efficiently, you need to follow coding standards to make sure you achieve the project's goals and objectives.

4. Use hook_schema and hook_update_N

Your module will need its database tables if it stores data in the database which is not Drupal entities or nodes, and you are going to use it as content. Make sure to declare the table schema you will need. You can use "hook_schema" in the module. install file. It will be created and removed on its own whenever you install or uninstall a module.

If you want to remove, add or modify columns or modify the schema, you can easily do these changes in an update hook. Use hook_update_N and bump the version number. Other developers or development teams can implement these changes by pulling your code by running "drush updb."

5.Use what Drupal offers

Drupal has several built-in and admin functionality to help you store and display your module's data. You can define the module settings pages using hook_menu; it will enable modules to register paths to help determine how URL requests are handled. You can use the drupal_get_form page callback to define and return the settings that are needed to be stored. One of the key benefits of doing this- you can restrict, submit and validate handlers to the form if the value has to be integers or existing data fetched from an API, etc.

6. Working With Cron

Cron is a time-based task scheduler that you can configure to execute tasks automatically without any manual involvement once the initial configuration is done. Drupal offers several built-in cron functionalities and a task queue for almost every module development. However, in some cases, like your hosting provider doesn't support cron tasks configuration or maybe you are facing issues in configuring it to run correctly, it is essential to check your site's status report to figure out if you can use Cron configuration.

7. Have A Dedicated Place For Your Custom Modules

Suppose you have named your Drupal custom module as "My_shop." In this case, call the new dedicated folder as "/module/custom/My_shop." It's always advised to create a proper place for this type of module so you don't have to struggle a lot when you want to use the new custom module. It also helps you keep the in-built Drupal module downloaded by Drpal.org and custom modules separated from each other.

8. Create A New Module If Necessary

Reuse the existing Drupal modules as much as possible instead of jumping to write one from scratch because the heavy "load" of custom modules can become challenging to maintain and update your Drupal website in the future.

9. Debug Your Module With Xdebug

It is also known as the golden rule to follow when developing custom modules in Drupal. Debugging your custom module code ensures that there are no PHP code bottlenecks, and you're using only the latest code.

10. Use Automated Code Checking Tool

Make sure to use automated code checking tools like Coder to ensure that your code is reliable, clean, readable, and adheres to Drupal’s coding standards. It also helps you ensure that you are following the best practices of your PHP version.

Apr 21 2021
Apr 21

Pros of Choosing WordPress Over Drupal For Website Development:

Ease Of Use – WordPress is a free and open-source CMS in which anyone can change and redistribute its source code. WordPress even offers mobile apps that make content editing, site administration easy on any device.

SEO-Friendly – Sites built using WordPress are SEO-friendly as there are several SEO plugins (such as Yoast SEO) inbuilt to help optimize content, meta tags, keywords, etc.

Responsive – You can use thousands of WordPress themes to make your site responsive and mobile-friendly. Using this market-leading CMS keeps you ready for the emergent responsive web technology.

Cost-Effective – WordPress is free, and even its paid features are less expensive than Drupal. The development, maintenance, and hosting cost of WordPress is lower than Drupal.

E-Commerce – WordPress provides plugins like WooCommerce to help you run your e-commerce site efficiently. Also, it has the features to help you handle the growing demand for your products and services.

Cons of Choosing WordPress Over Drupal For Website Development:

Frequent Updates – WordPress releases regular updates, and if you fail to keep up with these updates, it can bring your site to a screeching halt.

Customization Sophistication – You need to know PHP, CSS, and HTML to write complicated code if you want to add any enhanced feature to your site and

Pros of Choosing Drupal Over WordPress For Website Development:

Rapid Development – Drupal is agile and rapid, which helps developers create and deploy a website's core features and functionality. You can use the modules to cut down development times from weeks to days.

Extensive API Support – Drupal offers a range of API support, including Google Analytics, Facebook, Twitter, Google Apps, YouTube, that help developers create custom modules effortlessly.

Security – Unlike WordPress, themes, and modules are covered by an internal security program in Drupal. Therefore, it is not vulnerable when third-party plugins are uploaded as it is challenging to smuggle malicious content in Drupal.

Cross-Browser Usability and Support – Drupal is easy and suitable to use with almost all major browsers. The website's functionality and design translate as per the browsers.

Access Controls / User Permissions - Drupal has a built-in access control system using which you can easily create new roles with individual permissions in no time.

Cons Of Choosing Drupal Over WordPress For Website Development:

Installation and Modification – Drupal does not offer ease of use as WordPress because of its script, which is not user-friendly and needs advanced technical knowledge to install and modify.

Compatibility – Drupal is not backward compatible; if you have extra content and programs in place that you are customary to, Drupal might not be the right CMS platform for you.

We hope you have sound learning of both, WordPress and Drupal CMS platform’s pros and cons now. Again the choice of the right CMS platform for your business boils down to the question; what is your business requirement?

Apr 15 2021
Apr 15
Prevent Website Spam


This word contains so much pain and headache for any site owner. It is not possible to 100% eradicate spam from your website. However, it is possible to reduce these rates to a minimum, provided that you know how to prevent website spam.

Today we are going to tell you about the best ways to stop website spam. Our web maintenance company has chosen 6 handy anti-spam Drupal modules. You have to choose the one that suits you best and add it to the site.

Mar 26 2021
Mar 26
Protect Drupal web forms from new malware injection methods

We all know that malware can come from everywhere — but now that includes web forms.

Hackers have come up with a new malware injection method to distribute malware through web forms on your Drupal website.

Today Drupal web developers from Drudesk will show you how to resist this and protect your Drupal web forms from new malware injection methods. Read this blog if keeping your site safe is important to you.

Mar 11 2021
Mar 11
Choose Drupal 8 for your eCommerce website

Ecommerce sites are booming today, in part due to Covid.

For your business to succeed, it is important that the platform on which you build your website is scalable, reliable, secure, and flexible. Given this, Drupal 8 is the best option for building an eCommerce site today.

Feb 10 2021
Feb 10
Drupal 8 to 9 Migration

2020 was significant for web development — not just because of Сovid, but also because of the new version Drupal 9.

Since the new version was based on the same core as the previous one, the developers promise that the Drupal 8 to Drupal 9 migration will be smooth and fast.

Drudesk, our web support agency, has put together a guide for you on the migration preparation process from Drupal 8 to Drupal 9 to understand all the details and conditions.

Jan 07 2021
Jan 07

Since last June 2020, we heard a lot about Drupal 9. And you may wonder, should we do the update to Drupal 9?

Depending on you current infrastructure, the consequences won't be the same. That's why, our experts wanted to do this infography in order to give you some insights about you next Drupal project.

A project? A question? Don't hesitate to contact us: https://www.smile.eu/en/contact

Infography Drupal 9

Dec 16 2020
Dec 16
Drupal modules to increase site performance

Do you want your site to be the first in the search results, make users feel comfortable using it, and get a high conversion rate? Just make it as fast as possible!

Your website's speed is essential because, if the website is fast, users will visit it more often. Statistics say that if a user waits for 3 seconds and more, they will leave the website and never return. The most comfortable loading time for users is 2 seconds. You may ask:

Why do I need to improve the performance of the site?

It influences your Google ranking!

Nov 18 2020
Nov 18
Generates a username automatically in Drupal site

First of all, generating a username automatically in your Drupal site is very useful for the site admins and website visitors.

Let's start with the fact that today, to use the services of the site, users have to log in.

As a rule, registration includes filling in the following data:

Oct 21 2020
Oct 21
Image Effects on the Drupal 8 website

Drupal 8 has already proven its versatility. Its core already has modules for working with images, but installing additional modules will not hurt (for example, the Image effects module).

If you stop using just your Drupal site's standard features, there is no question that your site will increase in convenience, attractiveness, and victory over your competitors!

Our Drupal support agency has created today's blog to expand your site's horizons and introduce you to the main features of the Image effects module. Enjoy your reading!

Sep 30 2020
Sep 30
Drupal 8/9 modules for intuitive website navigation

Good website navigation is the best way to provide an enjoyable user experience.

To create intuitive website navigation on Drupal 8 or 9, you should use the appropriate website navigation modules.

As we have already mentioned in our previous blogs, if you want users to be comfortable using your site and find all the information they need, you should develop website navigation that would be easy for children to use.

Feb 28 2020
Feb 28
  • Core Modules: These modules are installed in all the Drupal installation packages; you can say that they are the basic (core) modules necessary for the site designing task, like handling the accounts of the users, providing menus for navigation.
  • Contributed Modules: This module can be downloaded from the official Drupal.org site.
  • Custom Modules: Custom modules are pretty self-explanatory – they’re explicitly coded for individual projects.

So here, we try to list out some of the modules from a Pandora of modules that can be used on the go for your web development, in a hassle-free way.

Read More - Move on to Drupal 8, Be Ready for Drupal 9!

Jan 20 2020
Jan 20

In this tutorial I will explain how I accomplished taking a listing of nodes that came from a View and created a Parallax effect using the Bootstrap theme from Drupal 8.

The code in this tutorial can be found on GitLab. 

To use the code in the repos, you can:

  1. Clone the repos locally
  2. Run composer install from the root folder
  3. Run drush config:import -y 

I would like to refer to this article which explains how to Add Parallax Blocks to Drupal 8 With ScrollMagic. I got my ideas and most of the code from there.

You will need to have Drupal 8 installed with Views and a Bootstrap subtheme set up.

For this tutorial, I am using a simple Page content type that I created with 3 fields: Title, Body and Background Image.

You should then create a View that lists this Page content type. I am listing the Body field and Background Image field in my example. I am keeping my Page content type and View very simple for explanation purposes. But you can set up more complex Views and content types as you wish. You just need at least an image field (or you can place a background image to an existing content type field via CSS as well).

Step #1 - Configure the Bootstrap theme

Because Parallax effects are usually full width, you should turn on the Fluid container option in the Bootstrap theme menu.

  • Enter your subtheme Boothstrap theme settings.
  • Under General >> Container check the Fluid container boxFluid checkbox

Step #2 - Set up your Content Type and Views.

Here is my Page content type with 3 fields: Title (not show in in screenshot), Body and Background image

Page content type fields

Here is my View. It's a pretty much standard View which just lists the Page content type and creates a page out of it. I am using the image field here as the background image for the Parallax. You can also use another field (text or whatever) and set a CSS background as the image.

View listing page content types

Now create some Page content and go to the View page to see the listing of your content.

Step #3 - Style the View using CSS

Here is my CSS:

.view-homepage {

  .views-row { text-align: center; position: relative; overflow: hidden; height: 500px; }

  .views-field-field-background-image { position: absolute; width: 100%; height: 140%; }

  .views-field-body {

    position: relative; top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    color: #fff;

Step #4 - Get the ScrollMagic files

Go to Github and download/extract library.

Now go to your theme folder and create a folder called /js/ and move these files into the folder

  • animation.gsap.min.js
  • ScrollMagic.min.js
  • TweenMax.min.js
  • and also manually create a blank parallax.js

You now need to tell the theme to load the js libraries. To do that, open your_theme/your_theme.libraries.yml:

     css/style.css: {}

    js/ScrollMagic.min.js: {}
    js/animation.gsap.min.js: {}
    js/TweenMax.min.js: {}
    js/parallax.js: {}
    - core/drupal
    - core/jquery

Step #5 Add the Parallax JS code to parallax.js

(function ($) {
    'use strict';
    Drupal.behaviors.myBehavior = {
        attach: function (context, settings) {

            var controller = new ScrollMagic.Controller();

            $('.views-row').each(function (index) {

                var $bg = $(this).find('.views-field-field-background-image');
                var $content = $(this).find('.views-field-body');

                var tl = new TimelineMax();
                    .from($bg, 2, {y: '-40%', ease: Power0.easeNone}, 0)
                    .from($content, 1, {autoAlpha: 0, ease: Power0.easeNone}, 0.4)

                var scene = new ScrollMagic.Scene({
                    triggerElement: this,
                    triggerHook: 1,
                    duration: "100%"

Make sure the images you are using are big enough for the max width you want to display.

You should now have a nice parallax scrolling effect for each node in the View list.

Parallax example

Jan 31 2019
Jan 31

Do you have a Drupal 8 website that you have migrated from Drupal 4 to 5 to 6 to 7 and then to 8 (or anywhere along this timeline)?

Do you have a Drupal 8 website that is not managed with Composer? (Maybe you installed the site manually?)

If your answer is Yes to any of the above, then this quick guide tutorial is for you. This tutorial will explain in 10 easy and proven steps how to take a Drupal 8 website and get it to be managed under Composer. 

Read how Drupal 8 uses Composer.

For this tutorial to be effective for you, you must take care of all the Assumptions I mentioned below BEFORE you start.


  • You have a Drupal 8 website and it is under GIT version control (using master branch).
  • You have not hacked core (but if you did note where you did it).
  • You have contrib modules and/or themes in your code base.
  • Any custom module or custom theme is in their usual Drupal folder (for e.g. drupal_root/modules/custom_module OR drupal_root/themes/custom_theme)
  • You have updated all Drupal core, contributed modules and themes to their latest stable version. (This is important for Step 6 to go smoothly)
  • For this tutorial code base means your Drupal root directory
my current codebaseMy current code base looks like this.

Step 1

Backup the following folders:

  • your public files folder

  • database

Do not worry about the rest of your code base because it is under version control.


Step 2

Git clone your code base locally and create a new branch off your master branch (or whatever branch your live repos sits on).


git clone

Now change directory into your newly cloned git repos.

git checkout -b composerize-drupal master

composerize-drupal is just the name of the branch we will be working in for this tutorial so we don't mess with our master branch. Once we are successful, we will merge this branch back into master.


Step 3

Note down the names of the contributed modules/themes that you currently use. It is ok to skip this step because your git version control (master branch) will have these folders still so you can refer to it from there through the git web interface.

But here are the Drush commands if you wish to do it this way:

To list all the contributed module: drush pm-list --type=Module --no-core --status=enabled

To list all the contributed themes: drush pm-list --type=Theme --no-core --status=enabled

If you hacked core or made custom patches, note down where these hacks/patches are in your codebase (again it should be viewable in your git interface in the master branch so you do not need to actually write this down)

Step 4

In your local branch , delete everything including all the files that begin with “.” (dot) from your Drupal root EXCEPT the .git folder. So now your code base should only have the .git folder.

Now you can stage and commit this change to the current branch composer-drupal:

git add -A

git commit -m "Remove all files and folders except .git"


Step 5

Install a new version of Drupal using Composer:

composer create-project drupal-composer/drupal-project:8.x-dev composerized-drupal --no-interaction

The name of the folder that composer will install Drupal too is composerized-drupal.

Now you need to move ALL of the files and folders from the folder composerized-drupal into the root of your original code base hence consequently leaving the composerized-drupal folder empty. Don't forget to move all the files that begin with a dot.

So from your code base root:

mv composerized-drupal/* ./

mv composerized-drupal/.* ./

rm -rf composerized-drupal

Now your code base should have the default Drupal composer files like Figure 2.

Figure 2Figure 2

Now it’s a good time to commit these changes.

git add -A

git commit -m "Added default Drupal composer files"


Step 6

For each contributed module, theme or profile from your old site you need to add it to the current code base by using composer such as:

composer require drupal/adsense drupal/backup_migrate drupal/codefilter drupal/ctools drupal/insert drupal/pathauto drupal/rules drupal/sharethis drupal/tagadelic drupal/token drupal/typed_data

Composer will then fetch the latest stable release and put it in the correct directory automatically.

Now it’s a good time to stage and commit your changes.

git add -A

git commit -m "Add contrib projects to the codebase."

Step 7

For any of your custom code:

  • Place modules in drupal_root/web/modules/custom/

  • Place themes in drupal_root/web/themes/custom/

  • Place profiles in drupal_root/web/profiles/custom/

Visit this link if you use 3rd party libraries.

If you made customizations to .htaccess or robots.txt, here is how to apply those changes in a composer managed Drupal site. (Don't forget to commit your changes to composer.json)

If you patched core, contributed modules or themes see this link to patch with composer.

NB - Do not just randomly add your customizations in without letting composer know about it. If you do this, your changes will be lost next time you run composer install or composer update.


Step 8


Restore a copy of the LIVE database to your local machine and visit the URL of the local site in your browser.

Drupal will automatically go to the install step. Follow through with the process and fix any errors along the way.

Clear the cache: drush cr

You may have to find other ways to clear Drupal cache if Drush does not work at this point.

Check the status reports and click around the site. Any errors you find, fix it and commit it.

The status page may have Drupal updates to the database available. Update the Drupal database if you need too.

Usually I visit admin/config/media/file-system to double check the public and private folder paths are set correctly.

NB - your custom files folder will be missing from your code base at this point. You can copy the files folder locally to drupal_root/web/sites/default/files if you need it for testing purposes but this will be taken care of in Step 10 on the LIVE site.

At the end of this step, drush status and drush cr should return clean results with no errors.


Step 9

This is the big step where you push the changes up to the master branch.

So push your changes up: git push -u origin composerize-drupal

Now we want to merge our composer branch into master:

git checkout master

git merge --no-ff composerize-drupal

Delete the composer branch as we no longer need it:

git branch -d composerize-drupal

Push the changes up:

git push -u origin master


Step 10

Now we need to pull in the changes on your LIVE server. Your LIVE site will be down for a few minutes in this step so you should do this at an off-peak time. In the event that something drastically goes wrong, you would need to revert the commit with the merge and restore your database and files folder.


Change your Webserver document root to point to code_base/web since composer would have placed all the Drupal files into a sub directory named “web.” This is a very important step.


git pull

composer install --no-dev

After running the above command, if you had previously made customizations to core, contrib modules or contrib themes, and you didn't tell composer about it, they will be lost like I said in Step 7.

At this point you may notice your original sites folder is still at code_base/sites. You can delete the folder completely because the web/sites folder will be in use now.

Copy your custom files folder to code_base/web/sites/default/files

Now visit your site and repeat Step 8 (except restoring a copy of the LIVE database to your local as you would be on LIVE now).

I hope this tutorial is helpful to you. You can leave a comment if you had any edge cases and the solutions that you found.

Dec 08 2016
Dec 08

"AddWeb Solution, a reliable Offshore Enterprise Web Design & Development Agency is consistently delivering ambitious digital experiences for a decade. Successfully delivered 500+ projects in multiple dynamic technologies like Drupal, Laravel, ReactJS, WordPress, Magento, and many more. in diverse industry verticals on the planet Earth with an artful agile methodology to ensure smooth deliverables. Contact us now to benefit from our honesty and skills."

Mar 21 2016
Mar 21

Last Friday, I gave the first in a series of front-end web development talks here in Taipei. There were 11 attendees as we discussed in length how to structure a site’s styles with CSS components and Drupal 8 naming conventions.

The success of the class was entirely due to the participants who were engaged and asked lots of questions to probe their understanding of the concepts and challenge me on things that seemed a bit off on my slides. We talked for over 3 hours; here are some highlights:

We started the evening by going over the core front-end development principles: progressive enhancement, accessibility, front-end performance, re-use, and automation. When we talked in detail about the layered approach for progressive enhancement, they noticed right away that it implies accessibility. Very astute! Now that I’ve had a few days to reflect on this, I can see a general pattern. Not only does progressive enhancement imply accessibility. Accessibility implies front-end performance. Front-end performance implies re-use. Re-use implies automation. They are all inter-related.

A few of the participants had used Angular.js, so we discussed how Web Components (the W3C spec), React.js components, and other framework components are slightly different than CSS components. Those components require a specific HTML element that contains any other markup; this forms a strict HTML structure that is always used when the component is used. CSS components, on the other hand, have a strict structure of class naming, not of HTML elements. The structure of our CSS component, e.g. .the-component, .the-component__an-element, etc., should never imply an HTML structure because they could be applied to different HTML structures. The classic example of this is the .button CSS component which can be applied to inputs (), buttons (), and links ().

They were amused by my drawing skills when I showed them my example CSS component: flower power.

When they saw my .flower__bed element, they asked how I would handle adding a .tree component that could also use a planting bed. Great question as it shows a very typical scenario in web development. I built the original .flower component with a simple initial requirement: the website only has one component. Now they were saying the requirements have changed; we have a design system with multiple components, a flower and a tree. Changing requirements on projects is natural. In this case we just need to do a simple re-factor. The .flower__bed probably needs to be refactored to be its own component, a .planting-bed component that can contain a .flower or a .tree.

They loved the class name of shame, .channel-tab__guide__upcoming-video__info__time. That name implies all sorts of HTML structure that makes the component difficult to refactor. .channel-tab__video-time is more flexible and much simpler.

One participant asked about an example class name I had shown, .the-component--modifier__an-element and we discussed how that should probably be replaced with .the-component.the-component--modifier .the-component__an-element as it makes it easier to create compose-able modifiers (e.g. .button, .button--big, .button--red can be combined to create a big button, a red button or a big red button.)

I love discussions of the ideas I present because I gain valuable insight from the participants. Thank you so much to all who attended!

By the way, if you missed the class or don’t live in Taipei, I’m available to teach your organization remotely or in person. Just contact me!

Sep 19 2014
Sep 19

After hours of searching Google, lots of trial and error, and a bunch of grumbling, I had a breakthrough and finally figured out how to get Source Maps to work under Chrome and Compass. The problem is that this functionality has been around for over a year in various forms in the pre-release versions of Sass and Chrome. As such, many of the posts I found were out dated and didn't work with the current, stable versions. So this post is partially to document the process for myself (and a small victory lap!), but hopefully someone else will get something out of it.

So with that said: As of Sept 19, 2014, with Chrome 37 stable, Sass 3.3.4, and Compass 1.0.1; here is how I did it!


The part I stumbled with the most was getting Compass to kick out the required map files and the required comment in the resulting CSS files. The breakthrough was finding this article (http://chillco.com/blog/setting-sass-and-compass-source-maps) by Tommy Keswick, from July 2014. This was the only article I found from 2014 on the matter!

Simply adding sourcemap = true to the config.rb did the trick. For a more technical approach, sourcemap = (environment == :production) ? false : true would only produce maps during development. This addition alone is all that is required to display the source Sass file in Dev Tools, rather than the generated CSS file.

Update: If you happen to be using something other than Compass to compile your Sass, have a look at Compass Sourcemaps over at WDW. It covers using sourcemaps with Gulp-Compass, Gulp-Ruby-Sass, Grunt Contribute Compass, CodeKit2, and the command line. 



Chrome has been supporting Source Maps for a couple versions now. So if you have a current, stable version, you are good to go. There is no longer a need to use Chrome Canary or enable any experiments.

A Workspace needs to be setup in Dev Tools to map back to the local development enviroment. In the case of Drupal, this would be the root of your theme.

Chrome Workspace Setup

The Workspace gives Chrome permission to the local file system, and also displays the local files in the Sources panel of Dev Tools.

Sass file in Sources panel

The final trick is to now tell Chrome how the files map together. Find a Sass file under the remote tree and map it to the local one.

Select Map

Chrome will scan the Workspaces and look for the best matches. Select the correct one.

Select local file to map to

It is only necessary to map one file, Chrome will figure out the rest. The Dev Tools will need to be relaunched.

Now clicking the name of the source Sass file in the Elements panel will open the file in the Sources panel for editing. CTRL+S will save the edits to disk, and if Compass is watching, generate a new CSS file with the change. For bonus credit, if LiveReload is also running, the browser can automatically refresh with the change also.

Jun 04 2014
Jun 04

Currently Drupal core does not offer any hook to do actions after a node/entity is inserted/updated/deleted in Database. So for example you can not send an email mentioning the node after the node is inserted because Drupal uses SQL transactions and the node is not yet fully written to database when hook node presave is called so if for any reason the transaction is rolled back, users will receive a false mail.

So Hook Post Action module introduces several new Drupal hooks to overcome this limitation
  - hook_entity_postsave
  - hook_entity_postinsert
  - hook_entity_postupdate
  - hook_entity_postdelete
  - hook_node_postsave
  - hook_node_postinsert
  - hook_node_postupdate
  - hook_node_postdelete

Feb 06 2013
Feb 06

For all Drupal's features, power, and flexibility, there is one area it has issues with - Content Migration. Getting content into Drupal in mass or from an older Drupal version can be brutal. So far each version of Drupal has had some sort of support for upgrading between versions included, but the chances of success can waver depending on how complex a site is and the modules used. Over the years a couple modules have risen to the challenge of addressing the migration problem, Feeds and Migrate

Migrating to Drupal 7 from Packt Publishing, and authored by Trevor James, tackles the often challenging task of getting content into Drupal from an outside source, and avoiding countless node/add forms. The books cover states "Learn how to quickly and efficiently migrate content into Drupal 7 from a variety of sources including Drupal 6 using automated migration and import processes."

Who this book is for

This book is for Drupal users, website managers, webmasters, content editors, or developers who have already installed and configured a Drupal site and understand its web-based administration; and who want to import data from other sources and websites into the Drupal framework.

This book will have little in terms of programming or code. Everything we do in the book will be configured easily by using the Drupal administration interface and module admin screens. We will look at some code briefly when we set up our Feature modules. You do not need to have any previous MySQL or PHP experience to work through these examples.

I want to call out "Who this book is for". Migrations aren't for the faint of heart and are a fairly advanced topic. I am not sure that is properly expressed above. "Drupal users" is pretty vague, and typically Content Editors are not behind the scenes folks, rarely will they be the people installing and configuring Drupal. However an intermediate site builder will do just fine with this book.

The book doesn't waste any time tediously explaining Drupal or how to install it, an advanced topic book shouldn't require it. Chapter 1, "Preparing Drupal for Content Migration", does touch on tweaking PHP memory, although focuses mostly on MAMP. The next 8 pages go on to detail how to install Admin Menu, CTools, Views, Job Scheduler, Features, Feeds, and Feeds Tamper. Considering the target audience should be familiar with Drush, this could have been shortened considerably, by omitting the install instructions and just explain why we needed the module and a brief synopsis. Note: The CSV file was not where the book said it would be in the sample files I downloaded. Instead it was in 0540OS_08/code/migration6/sites/$new_url/files/feeds/.

Chapter 2 is titled "Starting a Migration Path". It briefly talks about planning content types around the data to be imported, but focuses mostly on preparation for the supplied CSV file and less on theory. Again, some of the steps are more detailed than needed for an advanced topic book. More modules are introduced, without install instructions: Location, Location Feeds, Link, and References. A simple content type is created around the CSV, step-by-click-by-click.

Chapters 3, 4 & 5 deal with setting up, running and altering a Feeds import. This is the core of the book in my opinion. It does a good job running through things and explaining what is going on. Considering how detailed some of the earlier mundane steps where, there are a few things that feel a bit over assumed, but an experienced Drupaler should be able to figure them out. One thing that threw me was after preparing the import, "To run the import you need to go to the import URL for your site". This actually means /import. An Import link is also added to the Navigation menu, assuming you still have that block active - it is one of the first things I remove. A better wording or simply changing the sentence to "...URL for your site, 'mysite.com/import' ", would have saved me a trip the Feeds documentation and reading through the project documentation to figure it out. Reading the documentation on a module is always a good idea, but this feels like an oversight. Since the link isn't in the Admin area, it wouldn't have hurt to point out a somewhat irregularity from typical Drupal module admin structure.

Note: Feeds 2.0 has been released since the book was released, and the UI has changed slightly.  The book leads you to believe that referenced nodes will be created on import. Referenced Taxonomies do get created, but try as I might, I couldn't get the referenced nodes to be created. So my imports failed until I manually created the 24 Organization nodes for the referenced node type. Maybe I did it wrong, but there wasn't sufficient coverage on the topic to create reliable expectations on the outcome of this. 

While covering Feeds Tamper, there are two ways to access the settings mentioned. As of beta 4 there is a bug that breaks the link on the top of the Mappings page. A fix has been committed in the dev release, which also alters the UI some; Tamper now lives on a tab.

Chapter 6 covers packaging up the Feeds settings and Content Types with Features so they can be moved from a dev site to production.

Chapter 7 introduces the Migrate module as an additional method of importing content. It runs through importing the sample data included with the module. I am not really sure much is accomplished with this, as all the data is actually in the code included with the module. Migrate is a beast and requires coding to make it do anything and is considerably more complicated than Feeds. It also can be used to build on top of, such as the Wordpress Migrate module does later in the book. However the book doesn't go any deeper than that, and I suspect the only reason Migrate is covered as such is to provide a segue for the Wordpress Migration. However, for that reason this chapter should have been pushed back with the Wordpress chapter. Migrate is a beast, worthy of its own 100+ page book, so the dozen pages here really don't get you far. For a deeper look into Migrate, there is the Drupal.org community documentation and there was a technical session presented at Dupalcon Denver.

Chapter 8 really just rehashes the "official" method of upgrading Drupal 6 in place to Drupal 7. I was hoping there would be some alternative processes presented on doing this, as the upgrade can be quite troublesome for more complex sites. However unlike the official instructions included in the Drupal 7 UPGRADE.txt, the book introduces the use of the Upgrade Status module and the Drupal 7 CCK module as helpers. If you read enough about the upgrade on Drupal.org you will learn about these 2 modules, however UPGRADE.txt doesn't mention them. Upgrade Status is very helpful in getting a site ready to upgrade and identifying blockers. Fields moved into core with Drupal 7, instead of handled by CCK as in Drupal 6. So the Drupal 7 CCK module is used to convert them. I have ran through this upgrade a couple times with Upgrade Status and CCK before reading this book. The information on Drupal.org was a bit clunky and no where near as concise as it is presented in the book. I accomplished the upgrade following the steps in the book in record time!

Chapter 9 covers using the Wordpress Migrate module, which is dependent on the Migrate module. As such, swapping the Migrate chapter to follow the Core Upgrade chapter would make more sense to me. The chapter does a good job describing the process, unfortunately there are no sample files included. It would have been nice if the WXR export that was used in the book had been included in the code samples. I was able to pull an export from a clients existing Wordpress site and run through importing it into Drupal with decent success.


It is worth noting that both the Feeds and Migrate methods only bring over content, not menus. So there will still be work required to piece together the data imported.

The book does a very good job going through the process of importing with the Feeds module. It also covers the official D6 to D7 upgrade process in a very clear and easy to follow manner. The chapter on Wordpress to Drupal is a nice bonus. Additionally, it does that all in a manner that doesn't require coding skills. So an intermediate site builder should be able to handle them fine. 

However, the chapter on the Migrate module doesn't really do much beyond lay the ground work for the Wordpress chapter. Migrate really needs its own book, which requires considerable knowledge of coding and Drupal APIs. 

There are several screenshots that show content that isn't covered till later in the book, and a few places where it is assumed you have already created some fields and content types. With a little editing, omitting some unneeded tedious steps and shortening up the Migrate part, the book might have been reduced in size to about 100 pages.


The copy of Migrating to Drupal 7 that was used for this review was provided at no charge to Scott Wilkinson of HaloFX Media LLC by Packt Publishing. However, no other compensation was received for this review and this review was published without prior review or any influence from Packt Publishing.

Nov 14 2012
Nov 14

This is a small tidbit of information in the event that you wanted to alter the Drupal search results page. You can add a custom CSS class to the last search result item (for whatever reason you may have). In my case, I wanted to remove the border-bottom from the last result, so I had to add a special CSS class to do this. Just follow these simple steps:

  1. Override template_preprocess_search_results Here is how to alter the code. This goes in your template.php: function yourthemename_preprocess_search_results(&$variables) { $variables['search_results'] = ''; if (!empty($variables['module'])) { $variables['module'] = check_plain($variables['module']); } //checking the total number of results $num_results = count($variables['results']); $counter = 0; foreach ($variables['results'] as $result) { $counter++; if ($num_results == $counter) { //means we have the last result so we add the class $variables['search_results'] .= theme('search_result', array('result' => $result, 'module' => $variables['module'], 'last' => 'last')); } else { $variables['search_results'] .= theme('search_result', array('result' => $result, 'module' => $variables['module'])); } } $variables['pager'] = theme('pager', array('tags' => NULL)); $variables['theme_hook_suggestions'][] = 'search_results__' . $variables['module']; }
  2. Now we override search-result.tpl.php Create this file and put it in your custom theme folder.
  3. ">

    > ">


  4. Clear your cache

Now if you search for something, you will notice that your very last search result has the CSS class of "last". This also works for search results that have a pager. That is, the last result on every page will have the class of "last".

Oct 15 2012
Oct 15
Drupal 7: How to add a custom node view and force a node template to use it admin Mon, 10/15/2012 - 15:11

This is a small Drupal 7 tip if you wanted to create a custom node view and force a node template to use this custom node view.

Use case

Let's say you are creating a custom node template for a node of type "grades". You may need to show/hide specific fields in your content type for your Grades template. (This is just an example but you can use this tip in various ways).

The Steps

  1. You can create a new view mode by putting this code into your custom module:

  2. /** * Implements hook_entity_info_alter(). */
    function MYMODULE_entity_info_alter(&$entity_info) { $entity_info['node']['view modes']['custom_teaser'] = array( 'label' => t('Your Custom Teaser'), 'custom settings' => TRUE, ); }
  3. Then go to Manage Displays in your content type and set which fields you want to show/hide in the "Your Custom Teaser" view mode.
  4. Now you have to force the viewing of your node to use this custom node view "Your Cusom Teaser". Put this code into your custom module: function MYMODULE_preprocess_node(&$variables) { if ($variables['elements']['#view_mode'] == 'custom_teaser') { $variables['theme_hook_suggestions'][] = "node__grades"; } }
    This will force the viewing of your custom content type "grades" to use grade.tpl.php

Further Reading Here is how you would make a View use your custom node view for Drupal 7.

Tags Drupal Drupal 7 tip custom node view modes template Drupal Planet

Anonymous (not verified)

Mon, 10/15/2012 - 18:24

Found this module to be useful : http://drupal.org/project/view_mode_templates

Add new comment

Language Not specified
Aug 30 2012
Aug 30

Typically I find that learning by doing works best for me, and there are some subjects (Drupal) that lend themselves to this approach as well. Drupal 7 Development by Example sounded like just the ticket. Many of the big keywords are hit on while flipping through the preface. Initially this sounds great, but perhaps there are too many? This book appears to have all the right intentions, but maybe it bites off a bit too much?

Who this book is for

This book is for people who have some experience building websites and who want to learn to do so with Drupal 7. You should have experience with HTML markup, CSS, and jQuery. Experience with previous versions of Drupal would be helpful, but is not necessary.

The Book

Authored by Kurt Madel, the book was published in May 2012, about 2 months before I got it. It has roughly 340 pages of content, divided among 11 chapters. Glancing through the preface of what the book covers, the buz words flow: Module Development, HTML5, Theme Development, UX, Media, Views, SimpleTest and Features jump out. Additionally the preface covers some of the tools you will use: MAMP/XAMPP, GIT, Drush, Aptana Studio, Drupal core and a list of modules. The "Who this book is for" statement is also in there, I quote it for a reason. Also I would like to draw attention to the module list, which also lists the versions of the modules used, this is very important.

First Rant

Just 2 months after the book is published many of the instructions no longer work. This is because the modules have changed. While the preface list shows the version, it would have been very helpful to list the version when instructed to install a module. Then it would be fresh in the readers head that the version was different and a good clue why things don't look as described. Drupal is constantly changing and it's modules some times change at break neck speed, documenting them in print is going to have problems. Kind of the nature of the beast.

Moving On

Chapter 1 runs quickly through installing MAMP & XAMPP. I hate XAMMP, couldn't bring myself to do it (a subject for a future blog series). It does cover making a few tweaks for performance, so a few points there. Then onto installing Drush and Git, extra points for covering installing these on Windows. However when it came to installing Drupal I had to scratch my head. Drush is an awesome way to install Drupal, drush dl drupal. The reader is instructed to use Git to clone the Drupal project, while this works, it comes with a lot of baggage. As in EVERY version of Drupal from version 3 to version 8 and every point, beta and dev in between. Downloading with Drush brings down just the current stable release, which is 11.2mb and 1050 files. Cloning with Git grabs 61.8mb and 3023 files. There is a comment about how the Git method can make upgrades easy, but it is never explored. The process of installing Drupal is stepped through, like I would expect from a book that says you don't need experience with a previous version of Drupal, except the steps for copying settings.php and creating sites/$new_url/files are skipped. The chapter finishes out with Installing Aptana Studio and a quick introduction to Drupal.org. I had hoped some of the developer related features of using a full IDE would have been explored, however it turns out everything can easily be accomplished with Sublime Text 2, or even notepad.

Chapter 2 dives into Drupal with a new content type, and a lot of emphasis on schema.org. While interesting, it felt like we were losing focus and the schemas can get a little tedious, specially when they don't really relate specifically to Drupal. There is a discussion between, Core, Contrib and Custom modules. The t() function gets introduced, but kind of passed right by. This function is kind of a big deal in Drupal and probably should have got more attention. Some code gets thrown out there with instructions to modify some existing code, which is hard to follow. When instructed on creating our first module, the opening  tag is omitted from the instructions. The chapter wraps up by installing Views, building a simple block, and using Devel Generate.

Chapter 3 starts with a little HTML5 and microdata. I ran into some trouble with microdata, the descriptions didn't match with what I was seeing and then I started getting errors when the Microdata module was enabled. A new module is created for using a compound field. I had a lot of trouble with the code, and despite grabbing the example code from the website, the images stopped displaying.

Chapter 4 moves into themes, highlighting the Omega theme. Drush is used to create a base theme, but most all of the goodies in Omega are skipped over. Render Arrays get some attention and a decent first look. However the code used with hook_preprocess_node is kind of glossed over. For example twice the pages are used setting up Omega, as are used on the Render Array and the preprocess function. While Omega is a great subtheme, it didn't really add anything to the section. 

Chapter 5 focuses on UX, sort of. It programmatically creates a block with 70 lines of code, that could have been done with one line of HTML in a custom block. WYSIWYG is introduced. Then 18 pages and about 200 lines of code are used to create a custom Content Editable module. While the functionality is very cool, and a glimpse at what we might see in Drupal 8, it seemed way over the top for a beginner book, specially considering it was more javascript oriented and not so much Drupal.

Chapter 6 brings in the Media module and some major moving target issues. Additionally around this time my site melted down, Ajax errors every time I tried to add an image. Disabling all the custom modules didn't help. So to keep going I turned to Aegir and fired up a new site ( I love Aegir ). I pulled in all the example code from the website to get things back in sync, which is when I realized the sample code had some minor errors relating to CSS classes that needed fixing. There were a few minor errors in instructions and then I ran into a wall. We are instructed to use the 2.x branch of the Media module, which has some nice improvements over 1.x, but is under heavy development. The version is actually labeled 'unstable'. A lot had changed from when this chapter was wrote and now. Luckily Dave Reid, a Media module maintainer, was able to straighten me out in IRC. He pointed me to a Media 2.0 tutorial that explained how to set things up, drupal.org/node/1699054. Dave also expressed some concern about using the unstable version of Media in a book, it is just changing to fast right now. The Colorbox module is also introduced and has changed since the book was published.

Chapter 7 deals with various ways to get feedback. It starts with the core contact form and Webform. There is a nice exercise on adding some text to the core contact form. This is a great example of a beginner exercise, and functionality that should be in core! The Devel module is used to dig some info out of Webform so the HTML5 email type can be added to the form. This functionality was added to Webform in February to version 3.16. Once I realized why my code didn't match, I decided to move on. The middle of the chapter has a rather lengthy enhancement to the Colorbox module, which really has nothing to do with feedback. The chapter ends with the Fivestar module and creating a custom widget for it.

Chapter 8 is more about Views. Mostly basic Views stuff, but there is an example of creating a Views plugin. Although mine didn't look anything like the screen shot, even when using the sample code. The module list says Views 3.3, and the current version is 3.5, so not all the buttons and items are labeled the same. I was still able to follow along, but it was annoying at times. The chapter ends with promoting the Colorbox custom module to a full project and using the Coder module. Good stuff, but has nothing to do with the Views chapter it lives in.

Chapter 9 lets you know right off the bat that the content isn't all related, "Rotating Banners and Project Promotion". The banner part uses Views Slideshow and some custom CSS to tweak the display, good beginner stuff. Then it is back to our custom Colorbox module to prepare it for submitting as a full project. Not so much for beginners, although something to aspire to I suppose.

Chapter 10 is SimpleTest, which I have to say flew right over my head and think most beginners will be totally baffled by as well. While the SimpleTest module is in Drupal core, it really is a PHP framework.

Chapter 11 hits on Features, which probably should have come much sooner in my opinion. This is actually a pretty good run down on features. Bonus points. Features is just the kind of thing that new developers should be learning, and can be tricky to understand at first.

Final Rant

There are multiple times when steps are skipped in the instructions. There are no photos in the downloads, which may sound petty, except the instructions sound like we should have them. This book suffers from editing issues. I fully understand that things change from the time a book is started till released, but many errors would have been found by just running through the examples like a clueless newbie.

It may sound like I hated the book, I don't. However going back to that Who this book is for statement, it misses the beginner mark. In fact if PHP were in that statement, half my issues would go away.

Not all is lost

It is quite obvious that Kurt Madel knows Drupal development. I would say this is probably a decent intermediate book, that has some editing issues.


The copy of Drupal 7 Development by Example used for this review was provided at no charge to Scott Wilkinson of HaloFX Media LLC by Packt Publishing. However, no other compensation was received for this review and this review was published without prior review or any influence from Packt Publishing.

Jun 22 2012
Jun 22

This is the second of three Packt mini books available on Drupal, the third (Drupal 7 Multilugual Sites) will be reviewed shortly. Initially the HackMonkey was skeptical if multi-site Drupal really required an entire book? The HackMonkey was a bit biased, having been using multi-site installs since the early days of Drupal 6. However, it quickly became obvious that this book was covering more than just the simple, "add another folder to the sites folder and name it as the url". The book has about 78 pages of actual content, flipping through the Preface and what the book covered, the question then became, can Matt Butcher really cover that much content in only 78 pages?!

This book is much more than just step 1, step 2, blah, blah. It really is a good book for both beginners and more advanced users. Installing multi-site Drupal is actually pretty simple, however many people really seem to get stumped by it. But once you understand it, it is a breeze. The install process is explained in great detail and brings clarity to what all the files and directories in "sites" are about. It will also help the beginner easily understand why there is a "sites/all" and "sites/$new_url". Too many instructions simply say use "sites/all", but don't discuss why or why not you might want to. On the advanced side, there are examples of sharing configuration, code, themes, users and content between sites; this isn't newbie stuff.

In many ways this book covers more than just multi-site topics, as it explains some of the structure that can trip up those new to Drupal, and rapidly get a user up and running (using the Vagrant install). The HackMonkey would really recommend this little book to all Drupal  beginners, whether multi-site is on their radar or not. It just hits so many simple stumbling issues quickly and efficiently. It would also be advised for advanced users looking to push multi-sites, wanting to share content, and users. There are also some good best practices stuff on backups, and warnings on when not to share between installs.

Here is a more detailed breakdown on what the book covers:

Chapter 1

This chapter starts off with a rather lengthy (felt like it) run down on various popular ways to host multiple sites on a single server or account, Drupal or not. While this may feel tedious to someone really interested in just multi-site Drupal, it could be a good intro for the true beginners not familiar with the various options. Half way into the first chapter there is a decent run down on installing a custom Vagrant profile with VirtualBox to actually build a multi-site install. The chapter finishes out with some basic configuration info on Apache & MySQL.

Chapter 2

Many books drone on about how to install Drupal and waste a lot of space on something that is too basic for the intended audience. This book is a little different, because how you install multi-sites in Drupal is actually fairly important. The process for installing Drupal and subsequent sites is nicely detailed. It is in this chapter that all the files and directories relating to a Drupal install are discussed, including domain named directories, subdirectories and sites.php. The chapter is rounded out by finishing the installs through the web interface.

Chapter 3

Things start getting more complex now, settings, modules and theme use in relation to multi-sites are discussed. There is good discussion on the how, why and why not you should do so.

Chapter 4

There is a lot of flexibility to running Drupal multi-sites, there also can be some extra headaches. Updating core, modules and themes takes a little extra work and planning for a multi-site install. Always Back Up is emphasized, as well it should be! This chapter will help you navigate the topic easily.

Chapter 5

Multi-site flexes it's muscles here, as advanced configurations are discussed. Several modules are discussed to make life easier, as some aspects of Drupal need a little help to work right in multi-site. The advanced topics of shared authentication, content, structure and search are covered.


The HackMonkey easily recommends this book for anyone just starting with Drupal in general, and further for anyone interested in running Drupal multi-sites. There is decent documentation on Drupal.org for setting up multi-sites, but it isn't as concise, or as well organized as the information in the book. You will be up and running much quicker with Drupal 7 Multi-Sites Configuration!


The copy of Drupal 7 Multi-sites Configuration that was used for this review was provided at no charge to Scott Wilkinson of HaloFX Media LLC by Packt Publishing. However, no other compensation was received for this review and this review was published without prior review or any influence from Packt Publishing.

Jun 05 2012
Jun 05

Fear not the CLI, the Command Line can be your friend, trust the HackMonkey on this one! Drush is a perfect example of all that is wonderful about using a Command Line Interface with Drupal. To start off Drush can install Drupal & modules, clear the cache, enable & disable modules, backup sites, sync entire sites, wash the dishes, help you drink more beer, walk your dog, and make you look more attractive! Ok, it will not walk your dog or wash the dishes, but it can do all the rest and sanitize a database. That is kind of like washing the dishes, right? Don't believe me, fine. Check out this piece of classic Drupal cinema for more proof, Drush: More Beer, Less Effort. With all that extra efficiency you are bound to look more attractive to clients, right!

So now you understand why Drush is so awesome, and Packt Publishing's new book, Drush User's Guide is here to help you become a Drush Master. This book helps you jump right in and get going with Drush. It has lots of examples and has plenty for the novice Drupal chimp to the veteran Drupal gorilla. Authored by Juan Pablo Novillo Requena, a Drush contributor; it is also technically reviewed by Greg Anderson and Jonathin Araña Cruz, Drush co-maintainers and contributors respectively. There are no monkeys at the keyboard on this book.

The book immediately dives into installing Drush, it wastes no time explaining what Drupal is or the value of Open Source. You should have a grasp on those already. It goes into detail on how to install Drush on Linux, Windows & Mac and several different ways to do so. It is also up to date, covering Drush 5. Although a better job might have been done noting that some of the covered items are Drush 5 only. However, since the current stable release of Drush at the time of this review is Drush 5.4, it is a very minor point.

The book has 4 chapters and 119 pages, so it is easy to get through. The first 2 chapters cover installing Drush and the basic commands that any novice can master. The last 2 chapters cover more advanced topics.

All the basics like installing Drupal core, downloading modules, enabling modules, clearing the caches, and such are in these first 2 chapters. I was surprised Site Aliases weren't mentioned here, but they are covered in the third chapter, so keep reading even if you are a novice! While perhaps a bit on the advanced side, variables are also covered in the second chapter. Working with variables at the command line with Drush is a really powerful skill, and can save the day if you have a set variable cause a white screen. The Monkey did learn a valuable nugget on variables here as well. The HackMonkey knew how to set and unset Drupal variables with Drush, but didn't realize Firebug could dig the variable names out of the rendered page. There is also some great stuff on dealing with databases, monitoring Watchdog and using cron in the second chapter. There is one very minor typo in an example, the command to use cron is "drush cron", not "drushcron". However, since all Drush commands start with drush, a space and then the command, that is a pretty easy one to figure out.

The third chapter dives into the more advanced stuff, like writing our own commands, executing PHP from the command line, and optimizing the terminal with the core-cli command.  To make the most of these tools, some knowledge of PHP, SQL, and the Drupal API will be required. Site aliases and Drush config files are also covered, and are powerful tools that any Drush user can leverage. In the beginning of the book the example of syncing a development and production database with the simple command $ drush sql-sync @somewebsite.com @somewebsite.local is shown. Chapter 3 explains how this is done with site aliases.

The last chapter covers how Drush can interact with other modules from the command line, instead of pecking through the GUI. This falls into the category of "which are you more comfortable with?", the CLI or the GUI. There is a nice demo on using Drush to create a boilerplate starting point for building a module, which will save the habitual module builder some time.

The very last topic in the book just happens to be the one thing about Drush that the HackMonkey literally is bananas over - Drush Make! This fantastic tool can literally download Drupal core, all the modules and themes a site needs, apply patches, grab external libraries pull from Git repos and numerous other things with something as simple as $ drush make mysite.make mysite.com. Drush Make is awesome, read this section! The book doesn't cover all the different things that Drush Make can do, but the readme file included with Drush Make does. Drush Make is such an incredible time saver, it takes less than a minute for Drush Make to pull all the code together for hackmonkey.com!


Drush is awesome, and should be in every Drupal site builders tool box. The Drush User's Guide is a great resource for those just getting started with Drush, or for those looking to take their Drupal mastery to the next level of efficiency. At the start of the book, it is mentioned that commands would be shown full length, instead of the shorter command aliases. Anyone that uses Drush for any amount of time, wll quickly want to adopt the aliases. For example cache-clear becomes cc, watchdog-show aliases to ws and pm-download shortens to dl. While a cheat sheet of Aliases might have been a nice inclusion as an appendix, the good news is that all the aliases and extended syntax for all of Drush's commands are nicely documented on the Drush website, drush.org.


The copy of Drush User's Guide that was used for this review was provided at no charge to Scott Wilkinson of HaloFX Media LLC by Packt Publishing. However, no other compensation was received for this review and this review was published without prior review or any influence from Packt Publishing.

May 15 2012
May 15

Most Drupal books tend to be very code oriented, or spend the first 25% rehashing the same basics from a dozen other books. If you haven't installed Drupal, forget a book and get cracking over at drupal.org! If you are having trouble installing Drupal, odds are a book will not have the magic answer. More direct help may me needed. Luckily this book jumps right in to the content and doesn't waste any time!

At 170 pages it is a quick read, and a cheap read as well. Drupal Association Members can get the ebook for about $7, directly from O'Reilly! (Which is what the HackMonkey did.) You are a member of the Drupal Association, right? Design and Prototyping for Drupal is actually the second book in a 3 book series, which also includes Planning and Managing Drupal Projects and Drupal Development Tricks for Designers. All three are soon to be bundled together as a single book targeted at designers. Don't let that fool you, this isn't all pretty pixels and unicorns. This book is about getting work done, and the expectations are very much inline with HackMonkey's, the reader is expected to know HTML & CSS, but not be fluent in developer speak.

The primary topics relate to:

  • Sketching and wireframing
  • Breaking down a layout for Drupal
  • A brief discussion on grids
  • Some theme basics, including base themes and sub themes
  • Dealing with generated markup, focused on Views
  • An introduction to LessCSS

That is a fair bit of info to cram in, but Dani does a pretty good job by not languishing on any particular item, much. She keeps it brief, and meaningful.

Alright, one minor correction (already?!) Installing Drupal is touched on, but done so in a brilliant way! (Take note, anyone preparing to write a Drupal book!) Dani takes one paragraph, not a chapter, and simply directs readers to NodeOne's amazing Learning Drupal 7 screencast series. Bravo!

The books 15 chapters are grouped into 3 parts:

Part I
Getting Started: Some Stuff to Consider

Immediately no punches are pulled as she quotes Dries Buytart stating he makes designers write PHP, which is of course horrible code. The point is made that Designers using Drupal may occasionally have to peak under the hood to better understand what Drupal is up to. This is really about understanding and learning, not producing the next big module. The chapter continues on explaining the importance of focusing on the content, structure and functionality of the site; reserving the visuals till later. She breaks down the design process into 4 steps: 1) Ideation, 2) Wireframing, 3) Design Comps, 4) Iteration and Client Signoff. It is obvious she shares the Monkey's view that design is problem solving, not just images. This section is wrapped up with a quick run down on a few software tools for the Drupal Designers Toolkit.

Part 2
Design and Layout

Straight into Ideation and sketching. Included is a conversation with Mike Rhode and some examples of his process.

Included is one of the better break downs on using and creating Style Tiles I have seen, without droning on about each little part. While mobile isn't a topic in this book, the Monkey would note that Style Tiles are also an good way to explain visuals to clients for Responsive/Adaptive sites, without having to do a dozen mock ups.

The beginning of layouts are covered, focusing more on elements, such as tabs, H tags, blog titles and alerts. This avoids being blinded details, by focusing on the "page". There is also a new topic to the HackMonkey - Greyboxing.

The almighty grid! We also get the first peak at some HTML and CSS3. Todd Nienkerk discusses his love for grids. Again I learned something new, the CSS3 grid layout module. Pretty cool stuff, and a mind bender- an actual w3c draft,  CSS3 grids are only supported by IE10 at the moment. Duck! That is the sky falling!

A chapter on Fireworks, huh? Actually this chapter was an eye opener. I had long since dismissed Fireworks as "not Photoshop", however this chapter showed Fireworks strength of dealing with vectors and objects to mock up and design to a grid. The HackMonkey will be digging out the DVD to install Fireworks for the first time under Adobe's reign, and re reading this chapter.

Part 3
Prototyping, Theming, and Managing your Markup

There is a quick run through prototyping, including a discussion with David Rondeau. Layouts are broken down into smaller pieces, such as Nodes, Views, and Blocks.

Popular base themes are discussed, with some tips on evaluating them. The awesome Omega theme gets some extra attention, but a couple features mentioned are actually part of the Delta companion module. That is followed by a quick primer on creating a child theme. Jason Pamental discusses the somewhat controversial topic of theming in the browser.

Then there are 2 chapters of Views tutorials. Rather lengthy Views tutorials at that. They are well done, with lots of screen shots, but it seemed a bit out of place at this point in the book. However...while the first tutorial was a rather typical, it sat the stage a very good tutorial on controlling views markup. Drupal 6's Semantic Views, which are now in the core Views 3 on Drupal 7, are highlighted. There is also  some CSS and a little foreshadowing of LessCSS. The 2 chapters are quite good together, but still felt somewhat out of place, as they are the only areas actual site building is done in the book.

A few modules to help manage code are then highlighted. Personally, this HackMonkey would have rather seen this chapter expanded and the Views chapters shortened. There are many good modules to help wrangle code.

Finally we learn about this LessCSS mentioned and even shown previously. CSS Preprocessors are awesome! The HackMonkey will be giving more love to these in the future. Perhaps it is because the HackMonkey is more inclined to Sass as a preprocessor, but it would have been nice to at least mention Sass/SCSS and Stylus? Sass and Less pretty much work the same, and are wrote the same, except they are processed differently. Less is processed with javascript and Sass is Ruby. While Sass seems to be grabbing a larger share at the moment, none the less, CSS preprocessors are awesome, no mater which flavor you choose. This final chapter is a good, quick overview of the power of preprocessing CSS.


This really is one of the better Drupal books this HackMonkey has read recently. It actually taught me something by just reading it, as well as cause me to rethink my stance on Fireworks. I knocked it out on my flight to Drupalcon Denver. It covers some great areas that don't get much attention in the other avenues, and doesn't heap on a pile of code. You aren't going to master any skills from reading it, but will give you enough info to understand the value of the topics and wet your appetite to dig deeper. Additionally, the editing is done quite well. In the rush to get books out, there have been a few other Drupal titles that have severely suffered from bad editing.


The copy of Design and Prototyping for Drupal used for this review was purchased privately by Scott Wilkinson of HaloFX Media LLC. No compensation was received for this review and this review was published without prior review or any influence from O'Reilly Media, Inc.

Jan 30 2007
Jan 30

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /home1/markspap/public_html/kathy/includes/menu.inc). January 29, 2007

Now that I've worked on a few projects with Drupal v4.7, I have to say that I'm impressed as all get-out with it. Personally, I can't think of any reason not to use it on a majority of projects. But Drupal is my personal preference, and I'm not sure it would be the best one for everyone. Movable Type and WordPress are two of the most popular blogging systems. Although they can be used for other types of sites, they were specifically designed for weblogs. Their functionality and features are limited. But what they do, they do very well. For simple sites or weblogs, MT and WP are fairly quick and easy to set up. On the other hand, Drupal is a powerful publishing platform that can be used for everything from e-commerce sites to portals to intranets. It can also be used for blogging—in fact, multiple user weblogs are a default option. I have to admit that running a one-person blog with Drupal is a bit like going after a gnat with a bazooka. But some people like that kind of firepower. For them, the complexity and difficulty of running Drupal is more than rewarded by its versatility. Indeed, for some Drupaliers, developing the necessary skills is a reward in itself. At present, MT and WP are the "point-and-click instamatics" of weblogging software—Drupal is more for those who have their own darkroom in the basement. And this is unfortunate. Drupal is far superior software, and the lure of cool new features could make developers out of a whole generation of otherwise uninitiated users. In addition, the funding that comes with popularity wouldn't hurt Drupal, either. But Drupal will never be widely used outside the development community until it becomes easy enough to install to appeal to the "point-and-click" crowd. I've heard rumors that more custom distributions like CivicSpace and DrupalED may be coming from Drupal developers. With more preconfigured distributions with very good documentation, Drupal could well give MT and WP a run for their money.

Similar Notes

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web