Drupal features and taxonomy
In previous lessons, we created a feature module—first version alpha1, then alpha2. Now we’ll create the next version: alpha3. We'll add a taxonomy vocabulary for news sections, as well as tags for each news item.
We’ll create two taxonomy vocabularies: "News Section" and "Tags".
In Drupal 7, the "Tags" vocabulary already exists by default, so we only need to create "News Section". Next, we’ll add taxonomy fields to the News content type. Set the News Section field as required with a single term selection from a list. For Tags, allow multiple values and enable autocomplete for easy tag addition.
We’ve now updated the taxonomy and content type. Let’s also update the News View by adding a block that displays the news section field.
Since we changed taxonomy, content type, and Views, we now need to create a new version of the feature module to capture these updates. In the admin panel, click "recreate" for the desired feature module, set its version to alpha3, and add the two taxonomy vocabularies.
Save the new version of the feature module and deploy it to another site to update its functionality. Copy the updated module and revert Views to match the feature version.
Now the second site will also have a View displaying the news section, and the taxonomy vocabularies will include both tags and sections.
Note: You cannot use Features to import vocabulary terms—only the vocabulary structure itself is exported. To import actual taxonomy terms, use modules like Taxonomy CSV, Taxonomy Manager, Taxonomy Batch Operations, Taxonomy Export, or Exportables.