In the post on making output themeable I discussed the example of overriding a template file for a flag. The template file I overrode was a generic definition of the markup for all the flags on a site. I can create a template file that overrides a specific flag.
In Drupal an alter is intended to provide a way to modify an object during a point in the execution of a certain event or process. Alters are defined within individual modules. Those modules then give the opportunity for other modules to "alter" an object by calling drupal_alter at the appropriate time.
The whole point of creating a custom theme is to get a website to look the way you want it to. So, it's important for the output that modules generate to be themeable.
I will give a simple example of modifying the markup that is used to display some links. The Flag module provides a mechanism to do things such as "liking" a post or reporting a post as spam. A post may have a link for each flag that is associated with it.
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.
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.
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.
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!
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.
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:
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.