Drupal/C2/Taxonomy/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of Script: Taxonomy

Author: Varsha Venkatesh

Keywords: video tutorial, drupal, taxonomy, Categories, adding a taxonomy, vocabulary


Visual Cue
Narration
Slide 1:

Taxonomy

Welcome to the Spoken tutorial on Taxonomy
Slide 2:

Learning Objectives


In this tutorial, we will learn about
  • Taxonomy and
  • Adding a Taxonomy
Slide 3:

System requirement

To record this tutorial, I am using


  • Ubuntu Linux Operating System
  • Drupal 8 and
  • Firefox Web browser

You can use any web browser as per your choice.

Let us open our website which we created earlier.
Part 1
Time Narration
00:05 Now that we have all of our Content types and fields built, we need to add categorization.


And that’s where Taxonomy comes in.

00:14 Taxonomy is nothing else but Categories.


Going back to our IMDB example, recall that we had a Movie Genre field on the IMDB site.

00:26 Well, here’s the way it works in Drupal’s taxonomy.


Movie genre would be a vocabulary and that’s the term for the main category.

00:38 And in that vocabulary, we have Terms.


So, on the screen, we have ACTION, ADVENTURE, COMEDY, DRAMA and ROMANCE.


And then under COMEDY, we have ROMANTIC, ACTION, SLAPSTICK and SCREWBALL.

00:50 We can have unlimited nested categories or terms in a Drupal vocabulary or taxonomy.
00:59 Now, here’s one thing that is really important.


One area that many sites fail on is -

  • using the built-in tagging widget or the tag vocabulary
  • to categorize their content.
01:15 While it is great to be able to add categories on the fly, it has some inherent problems.
01:21 What happens if someone types a typo?


So energy – e n e r g y isn’t the same as e n r e g y and Drupal doesn’t know the difference.

01:31 So suddenly, we will have 2 categories and the content is no longer connected.
01:38 That’s why we always recommend a closed taxonomy, like the one on the screen.


It’s easy to set up, and we are going to do that later on in this series.

01:47 For now understand that, Taxonomy can be used in so many ways.


We’ve already seen how it creates lists of content.


But we can also use taxonomy to filter and sort all kinds of Views, if we use it correctly.

02:02 Well, let’s dive into taxonomy now.
Part 2
Time Narration
00:05 We will set up a taxonomy for our Events Content type.
00:14 Click on Structure, scroll down and click on Taxonomy.
00:18 As you probably remember, we have been setting up tags all along.


But as I mentioned earlier, we want to have a closed taxonomy -

  • something that we can control,
  • and not something that people can easily add terms to.
00:34 So we will click on Add vocabulary.


And let’s name this as Event Topics.


In the Description, we will type - This is where we track the topics for Drupal events.

00:48 Click Save.


Now we can add terms to our vocabulary.


Click on Add a term.


On the screen you see a list of the terms that we are going to add –

Introduction to Drupal,

Site Building,

Module Development,

Theming, and

Performance.

01:07 Let’s add those – Introduction to Drupal and click Save.
01:19 When we click on Save, and it brings us back to this Add screen again.
01:24 Now, I’ll type Site Building and click Save.


Module Development and click Save.

Theming…..., I’m just pressing Enter and it automatically saves.

01:45 And then the last one is Performance, and click Save.
01:49 We can add complex vocabulary here, but we’ll just keep this simple for now.
01:58 Clicking on Taxonomy here, and listing the terms in the Event Topics.


We now have Introduction, Module Development, Performance, Site Building and Theming.


And they’re in alphabetical order.

02:12 But, I want to arrange them in the order of difficulty.


So I’m going to -

  • move Module Development down,
  • Site Building up,
  • and I am going to put Theming after Site Building
  • and then Performance at the very end.
02:27 Just click and drag these.


Always remember to save your changes.


Otherwise Drupal won’t remember them after you leave the screen.

02:40 So click Save.


And there we have our terms in the order that we want.

02:48 We have added the taxonomy, but our Content type doesn’t know about this yet.
02:54 So let’s go and click on Structure, Content types.


And let’s manage our Fields and the Events Content type.


Then click Add field.

03:06 Selecting a field type in this case is a Reference to the Taxonomy term in the vocabulary we just created.
03:16 So choose Taxonomy term and let’s name this Event Topics.


Click Save and continue.

03:27 And now it’s going to ask us which Type of item to reference.


Since we have already chosen that, be careful here.


We will change it to Unlimited because an event can have more than one topic.

03:42 Click Save field settings.
03:45 And down here, we need to make sure that we choose the correct reference type.


Let’s choose Event Topics.


Here, this is going to allow us to Create references entities if they don’t already exist.

04:01 This is called Inline entity reference.


Basically it means, if there was a topic that wasn’t in our listing, then any user can add it on the fly.

04:12 We don’t want anyone to do that, so we will leave that unchecked.
04:16 Click Save settings.
04:21 There is one more step before we add content.


We need to set up our URL patterns and we usually do this before we add content.


This ensures that the content we add has the correct human-friendly URL.

04:34 We’ll do that later on in this series.


With this we come to the end of this tutorial.

Slide 5:

Summary


Let us summarize.


In this tutorial we have learnt about

  • Taxonomy
  • Adding a Taxonomy
Slide 6:

Acknowledgement


This video is
  • adapted from Acquia and OSTraining
  • and revised by Spoken Tutorial Project, IIT Bombay.
Slide 7:

Acknowledgement


The video at this link summarises the Spoken Tutorial project.


Pls download and watch it.

Slide 8:

Spoken Tutorial Workshops


The Spoken Tutorial Project Team conducts workshops and gives certificates.


For more details, please write to us.

Slide 9:

Acknowledgement


Spoken Tutorial Project is funded by
  • NMEICT, Ministry of Human Resource Development and
  • NVLI, Ministry of Culture

Government of India.

This is Varsha Venkatesh signing off.


Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Priyacst