Skip to main content

Learning Drupal

When i started with Drupal, it was a stuttering start, I installed drupal on my wamp development machine and voila it just worked. Woo hoo, there was a ready framework with built in login and authentication, and i could create content see it appear on the front page, with a little bit of tinkering i could change theme, download themes from the website and all looked swell.

After a while i realised, things werent moving much, i was soon struggling with finding a way to remove the login block, once i did that i was struggling with accesing the login page without the login block. took me a little while before i found what requires to be done. it was then that it dawned on me -It was not going to be easy, but boy i was going to enjoy it. This was Drupal 5 and Drupal 6 was just about to come into being, there were not a lot of drupal books, not much on the internet.

For drupal starters there has never been a better time. Drupal 7 is here, there are a lot of books available, the drupal community has worked very hard on documentation and lots of good books are around, for the more hardcore drupal developers and for drupal enthusiasts. It is quite easy to go 0-60 in a few seconds, and whip out a x.module file and start to code, it often helps to sit back and start from thinking what you want to do. Here are a few tips to help learn drupal 7 development.

  • Install Drupal on your development machine, take it for a spin - see the power of CMS for yourself, familiarise yourself with the admin options, managing users and roles, create content and content types.
  • Start with a good book like 'Using Drupal', this shows you the ins and out of the drupal system, how things are accomplished, there are a lot of case studies for some common websites. This point can never be underestimated, you do not want to invest great time and effort and later find there is a module or a combination of modules already that does what you want to do. No surprise, there are close to 9000 modules available.
  • Use the example modules, that list a lot of examples of how to do things the right way. a very good tutorial as you can see these bits of code in action and see what is behind. I have found them incredibly helpful.
  • Ask questions on drupal forums, keep a good list of blogs and websites for drupal information.
  • Read, Read, Read
Drupal has a steep learning curve, but believe me it is worth it. Hope you enjoy your time with drupal like i do.


Popular posts from this blog

Create a drupal development environment using docker.

Currently at work i am using docker to streamline and speedup of development and deployment to testing and production, I am using symfony currently and our app is dockerised, i wanted to do the same for drupal based apps.

I searched for a official drupal docker repo and i did find this.

Unfortunately there was very terse explanation but pretty much worked, i found a few hiccups along the way so wanted to share what i did.

Install docker for your environment. Lots of details are available at explaing docker and installing docker for your environment.

The docker repo holds the drupal container at, following the instructions this is how to create the drupal container:

In order to use my code base we need to mount the volume with the -v directive as below, we do this in one command:

docker run -v /$HOME/work/drupal8:/var/www/html -p 8080:80 --name mydrupal -d drupal

this will create…

Use feeds module to import XML data in Drupal 7

Recently i had to setup a xml import process to import data from an external supplier on a regular basis, the filename and format was not changing and i could choose where to store the file. Following is how i set it up.

First we need to download the following modules

feeds admin ui

enable the above modules.

We will need a sample XML so this will be the one we will use for this demonstration:

<?xml version="1.0" encoding="utf-8" ?>
<!-- Sample for demonstration of processing XML feeds with feeds module -->

How do you expose your legacy database tables to views in drupal 6 Part 1

This is a 2 part post, that shows how I exposed a legacy table to views in drupal and used the incredible power of views to create many combinations static and conditional views. This was very helpful for my client.

I had a requirement that warranted exposing existing database table to views, so that views can contain data from this table.  To enable this to happen, the following steps need to be taken.
In a custom module you need to first define the views_api hook as following:
function candidate_views_api(){ $view = array(); $view = array('api' => 2, 'path' => drupal_get_path('module','candidate'). '/views'); return$view; }
candidate module was a custom module which I already had, so it made sense to add this hook here. 
The important bit here is telling the drupal sub-system where the views file will reside. 
Then create a file with your <modulename> in my case it was, this file should have two hooks, one …