As we wrap up and review the series, we also look at other modules that work with, or depend on, Features to provide you a jumpstart.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
When you write your own custom modules, you can make them exportable to Features as well. Here we look at how to do that with the Chaos Tools (CTools) module.
Additional resources
CTools project (Drupal.org)
Features will auto-detect dependencies for you, which can be very handy, but at times it can also be very frustrating when you don't want them to. In this video we introduce the Features Plumber module and show you how to use it to finely control your dependencies.
We are sometimes asked how Features can be removed. Since a Feature is just a normal module, you can disable it on your module administration page, and even uninstall and completely remove it from your modules folder. That will completely remove the feature from your site.
Note: The Features plumber module is no longer necessary if you're using Features with Drupal 7. The functionality provided by this module has been included into newer versions of the Features module. So as long as your Features module is up-to-date you should be good to go. The concepts from this video do still apply.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
If you have more than one feature module on your site, they can sometimes step on each other and cause nasty conflicts. We'll create some conflicts and show you how this happens and how to back out of them.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
One thing we haven't looked at in our feature yet is Drupal roles and permissions. Here we will create a role associated with out Blog feature and look at how we can roll that important bit in.
In this video we are using the Environment Indicator module to visually distinguish between different environments.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
Features are most often used for building out actual site features. Here we look at how you can use Features to provide you with quickstart developer tools as well.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
Features is a module which generates modules for us. You can then extend that module just as you would any other Drupal module. In this video we'll add some additional code to our feature to make it more complete for our needs, outside of the realm of what Features itself can provide.
The features module (and the drush command) are pretty smart about not overwriting custom changes, and your chances of overwriting your custom code are pretty slim. When features exports a module it creates a .module file with only one line of code in it. Which is an include for another file: mymodule.features.inc. Features then puts all of the automatically generated code into this included file. When you regenerate or update a feature it just uses the existing mymodule.module file which maintains any code that you wrote, and then regenerates the mymodule.features.inc and associated files.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
In this video we'll specifically look at using Git as a tool to aid our development process, especially when working with other people, to make sure that you don't step on each others toes and destroy work.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
Often you need to create a feature with system variables to make them complete. Features itself does not provide this, but the Strongarm module does, and we'll see how to add that to the mix.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
Sometimes when a feature has been overridden we don't want to update the feature, but instead go back to where we were. Here we will look at how to revert a feature, as well as how to use Drush to make these processes much faster and simpler.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
In this video we'll look at how you can update a feature by making changes, reviewing overrides, and then recreating the feature for deployment.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
We'll take some time to open up the feature we've created and look at the code that was generated so that we can better understand what is going on under the hood.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
We'll create our very first feature and then see how it works by putting on our production site and enabling it.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
Hands-On: Generating Sample Content (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
This is a quick overview of the various pieces we'll be covering in this series.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
James Sansbury defines Features (a module that helps organize site components and applications for specific use cases), as distinct from Nodes and other forms of site content.
Prerequisites
This series assumes that you can install Drupal 7, create a basic content type, create a basic view, and use Drush. See the following resources if you need a refresher:
- Create a New Content Type
- Creating a New View
- Introduction to Drush series
- Installing Drupal with Drush
Additional resources
Features project (Drupal.org)
New Features Video Released
Blog postToday we released a new video on using the Features module for Drupal 7: Deployment with Features and Drush. This is a wonderful developer tool that helps you roll out consistent features to your sites and speeds up deployment (e.g., moving work from a development server to the live site).
Video Series on Image Styles
Blog postWhen I’m learning any software, the first thing I want to do is play with all the features and make my creation pretty, using all the bells and whistles. I remember the first time I played with PowerPoint…I had swirling text and zig-zagging images everywhere.
I am going to show you how you can upload an image of any size and it will automatically display as the size/style that you designate by editing the display field settings for your content type. We are going to add an image field to the basic page content type and set the node display to use medium size of 220 wide by 220 tall. Being able to set a standard for image display creates consistency and a better user experience. Site builders and content administrators will also have less work because you don’t need to cut all of your images before you upload them. Drupal does all the work for you!
This video introduces you to the Vi (and Vim) editor. Vi is the most common text editor that you will have available to you on *nix systems so it pays to at least learn the basics in case you end up somewhere where that is all you have to use. Vim is also actually a very serviceable editor which many people (mostly hardcore geeks) use as their day to day editor. We'll talk briefly about Vi versus Vim, then open a file, move around, and close the the file. Our next video will dive more into editing files with Vi.
Note: There are a lot of editors out there on various systems, notably emacs, nano, and pico. Vi is considered the lowest common denominator (i.e. it is the most commonly available one), which is why it is the one being covered in the command line basics series. It is also the editor that I use personally, so is the one I am most familiar with. Please limit editor war discussions to other threads on the internet that are meant for them.
Note: this video was originally released July 27, 2010 on Lullabot.com.
Note: In some places the command line prompt is cut-off. The YouTube version of this video doesn't have the cut-off problem. We are working on getting this fixed, but in the meantime, check out the YouTube version instead.
Command Line Basics 9: Introduction to Vi/Vim editor (youtube.com)