Skip to: Site menu | Main content

Understanding the Drupal Way - Hooks

In Drupal a hook is intended to provide a way for actions to be triggered during a point in the execution of a certain event or process. Hooks are defined within individual modules. Those modules then give the opportunity for other modules to "hook into" their processing by calling the hook at the appropriate time.

Understanding the Drupal Way - Collaboration

Collaboration is an important part of the Drupal community. The principle of collaboration applies equally to how people in the community engage with each other and to how modules are written.

I mentioned the Libraries API in a spearate post when I discussed creating a slideshow. The specific example was that you would use the Libraries API and you would also use the jQuery cycle plugin as part of creating a slideshow.

Understanding the Drupal Way - Extensibility

When creating a module for Drupal it is important to write the module so that it is extensible by other modules. I will talk about ways that it is possible to do this in other posts.

I mentioned a couple of examples of extensibility in the Modularity post. In my example of adding a slideshow to a Drupal site I said that you would likely use Views, Views Slideshow, custom content types and custom fields.

Understanding the Drupal Way - Modularity

I mentioned in a previous post that Drupal is a modular framework. The idea is that modules should be designed to do one (small) thing well. This is in contrast to the monolithic approach that plugins employ in other content management systems.

For example, if you want to add a slideshow to a WordPress website you can download a single plugin from the WordPress official site. When I visited the WordPress site and searched on slideshow I got over 500 results!

Understanding the Drupal Way - Subthemes

In order to retain the changes you make to a theme like the Bartik theme you need to create a custom subtheme. Use the Bartik theme as a base theme.

It's beyond the scope of this post to go into detail about Drupal's theme layer and how to create custom subthemes and themes. So, I won't explain everything you have to do. You can find more information on Drupal.org.

Understanding the Drupal Way - Basic Drupal Principles

The first thing to understand about Drupal is that it is based on a modular approach to providing functionality. I will elaborate on this further in another post.

The point I want to focus on in this post is that every module on a Drupal site is a first-class citizen. There are no "special" modules that can so something that other modules cannot do.

Three basic types of modules are:

  1. core
  2. contrib
  3. custom

Build a Website That Works for You!

No matter what tool you use to create a website, you still need to put time into planning before you actually start designing and building the site. If you rush to start with the design and build process you run the risk of having a project that takes more time and money than desired and generates less of a return on investment. There are key questions you need to answer to ensure that you create a clear and comprehensive website definition document.

How Much Will it Cost to Build this Website?

As professionals in the web tech sector, we know that there is no one set answer to that question. And yet, we really don't want to be spending our time having to explain over and over to prospects why we can't just answer the question.

We could provide an analogy and respond by saying, "That's like asking a random custom home builder how much it's going to cost to build a house." We could continue by explaining that the builder will need to know the location of the house, the square footage of the house, the desired finishes on the house, etc.

DrupalCon LA Saturday Recap

I headed to the Saturday sprint after completing my workout, showering, eating breakfast and packing my bags. Eventually, there were probably at least 30 people at the sprint. I worked a bit more on a patch I submitted to the Flag module and eventually started working on testing the changes I pushed to OG Forum D7. Unfortunately, they changes appeared to be doing absolutely nothing. I didn't figure out what I was overlooking before I had to leave.

DrupalCon LA Friday Recap

From my vantage point the sprint day was extremely well attended. I spent my day working on a patch I had submitted to the Flag module and working on OG Forum and OG Forum D7.

We had the traditional live commit in the afternoon.

There wasn't any announcement if any more critical bugs were squashed for core.

How many of you participated in the sprints? When did you head home? Are you participating on Saturday?

Credits: XWeb | Chris Herberte | Andreas Viklund