New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Exploring content categories

From: Drupal 6 Essential Training

Video: Exploring content categories

If you'd tried building a forum in Drupal, you've already encountered a way of defining content with categories known as Terms. In that case, each term you've defined became the name of a forum, but Drupal system of categorization has uses well beyond that simple example and in fact, is essential to advanced functions you might want to add later to your Drupal site. Before we go on, let's take a look at what exactly categorization does for a site. We'll do that by looking at Lynda.com. On Lynda.com, you can see the videos that are available according to product or vendor, the number of other categories or you can look at All Courses. Let's do that now. On this page, you can see that Acrobat 9 Pro Essential Training shows up in the Acrobat 9 category, which makes perfect sense. That's because this video has been tagged Acrobat 9. But you'll notice it also shows up under Acrobat. So, it has two tags to it; Acrobat 9 and Acrobat. The good thing about this system is nobody has to maintain this page specifically; all they have to do is to add the correct tags and then build a system that will collect all the ones that have a certain tag and put them in one place. So, for example, if we go down to Product, Acrobat, we see only those that have the Acrobat tag. But enough about the Lynda.com site, let's go back to our Drupal site.

Exploring content categories

If you'd tried building a forum in Drupal, you've already encountered a way of defining content with categories known as Terms. In that case, each term you've defined became the name of a forum, but Drupal system of categorization has uses well beyond that simple example and in fact, is essential to advanced functions you might want to add later to your Drupal site. Before we go on, let's take a look at what exactly categorization does for a site. We'll do that by looking at Lynda.com. On Lynda.com, you can see the videos that are available according to product or vendor, the number of other categories or you can look at All Courses. Let's do that now. On this page, you can see that Acrobat 9 Pro Essential Training shows up in the Acrobat 9 category, which makes perfect sense. That's because this video has been tagged Acrobat 9. But you'll notice it also shows up under Acrobat. So, it has two tags to it; Acrobat 9 and Acrobat. The good thing about this system is nobody has to maintain this page specifically; all they have to do is to add the correct tags and then build a system that will collect all the ones that have a certain tag and put them in one place. So, for example, if we go down to Product, Acrobat, we see only those that have the Acrobat tag. But enough about the Lynda.com site, let's go back to our Drupal site.

To start categorizing content, we go to Administer and Modules and make sure that the Taxonomy module has been turned on. It's automatically turned on if you've turned on the Forum module as we have done. In fact, you can't turn it off but it's required by the Forum module. If, however, it's not checked, you would check it here and then go down to the bottom of the page and click Save Configuration. Once you've done that, you are ready to administer your taxonomies. To do so, go to Administer and scroll down until you get to Taxonomy. Because we have already created forums, we see one taxonomy down here, which is Forum Topics. We are going to add one that's going to be specific for blog posts, so that when somebody posts something in their blog, they are forced to say exactly what category it falls into. We'll do that by clicking on Add vocabulary and we fill in the fields below.

For us, that will be name is Blog post categories. The Description will be Tags to categorize blog posts and for Help text, we'll just add, Help others find related blog posts. Continuing down, we can say what sort of content type we want this to apply to. We are only going to categorize our blog entries, so we'll click there but we could do multiple content types. At the bottom of this screen, we have three settings that are specific to taxonomies. One of them is Tags. The difference between Tags and an ordinary taxonomy is that with a standard taxonomy, the user can only choose from categories that you've already defined. With Tags, they can enter their own categories. We'll show exactly how that works in a moment.

Multiple select, as might imagine, allows people to include several categories in their posts and finally, Required will force them to enter at least one category in their post. We are going to turn on Required here and click Save. Very good, now let's see how this affects an ordinary user. To do that, we are going to switch to Fishy Joe's account. He is logged in, in the Firefox browser. And let's take a look at all of the blog posts. We do that by going up here and going to /blog and we can see that here is one that Fishy Joe has posted. Let's go into it and edit it. You'll notice a new option, Blog post categories, in that little orange star means that it's required. If Fishy Joe decides not to add on, we'll see what happens.

Ah! He is one that he has to. So, now he would have to choose something here but for right now, he doesn't have anything to choose, let's go back to our administrative interface and give him some options. So, we are back Administer and Taxonomy and at the bottom, we have Blog post categories. Now, we list the terms and see there's nothing there, we need to add additional terms and these terms will be what Fishy Joe will be selecting from. Let's call a term Buying.

For Tags, I suggest that you only have single words to avoid confusion. Under Advanced options, we can choose whether that term is the child of another term or the parent of another term and create a hierarchy of terms. We can also say, whether it's a synonym for another term. We won't get into any of those advanced options at the moment, instead we'll click Save and you'll notice that it leaves you on the Add terms screen. That's because typically, when someone is creating a taxonomy, they create several terms at once. I am going to add Selling and I'll create Properties. I think that's enough terms for now. Well, let's add one more. Lifestyle. Very good. Now, let's go back to Fishy Joe's account and view this note again and edit it again.

Now, when we go to Blog post categories, we can see that there are several choices there that he can choose from. In this case, he is talking about buying properties, so we'll select Buying and say Save. But here's the thing; he is talking about buying but he is also talking about properties. Maybe we should let him select more than one. Well, let's go back to our administrative interface and make that so. To do so, we go back here and Administer and Taxonomy. From there, we can edit our vocabulary, scroll down to the bottom and allow a multiple selection. Scrolling down further, we save it and then let's go back to Fishy Joe and see how that affects the ordinary user. Click again on Edit. Now, you'll notice it's a different sort of menu and if you hold down the Command key on the Mac or the Ctrl key on a PC, you can select more than one.

In fact, you can hold down the Shift key and select all of them by selecting the first one and then the last one, but we are just going to have Buying and Properties. Scroll to the bottom and save. Very good, you'll notice that those tags show up after the post. So for example, by clicking on Buying, we would show all such posts that were about buying because they had been tagged as Buying. There is one last thing we are going to do by switching back to the administrative interface. Let's got back to that taxonomy, edit the vocabulary and scroll to the bottom again. This time, we are going to let it be free tagging and we save it and see how it affects an ordinary user by going back to Fishy Joe. Let's edit it one more time and you see that instead of having a drop-down menu, it's this list into which he can freely add tags. There's something interesting here, which you see in this little circle. Let's just try typing Buying. Ah! It notices once you start typing that there is something in there already called Buying.

If I do comma and do another one and we can start typing the next one. Ah! Properties, it recognizes that. So, we'll click on that. We'll then scroll to the bottom and say Save and there we have it. We have tagged our Blog post as Buying and Properties. If we want to see all the properties tagged to blog posts, we would just click there and there we are. Of course, we only have one at the moment but we could have many as the site grows. As with any other part of your site that's open for user interaction, taxonomies can be abused. One way to avoid such problems is to limit categorization only to those pre-determined tags that you have defined.

Show transcript

This video is part of

Image for Drupal 6 Essential Training
Drupal 6 Essential Training

66 video lessons · 31210 viewers

Tom Geller
Author

 
Expand all | Collapse all
  1. 4m 38s
    1. Welcome
      50s
    2. Using the example files
      3m 48s
  2. 28m 55s
    1. Drupal is a CMS
      7m 43s
    2. Choosing Drupal
      5m 32s
    3. Checking Drupal's requirements
      4m 26s
    4. Understanding the inner workings of Drupal
      4m 35s
    5. Meeting the Drupal community
      6m 39s
  3. 11m 28s
    1. Learning key terms in Drupal
      5m 20s
    2. Touring Drupal's interface
      6m 8s
  4. 34m 35s
    1. Installing WAMP and Drupal on Windows
      9m 41s
    2. Installing MAMP
      4m 34s
    3. Setting up the database on a Mac
      2m 2s
    4. Downloading and installing Drupal on a Mac
      6m 37s
    5. Troubleshooting installation problems
      3m 49s
    6. Automating updates with cron
      7m 52s
  5. 25m 37s
    1. Setting up clean URLs
      5m 52s
    2. Backing up your Drupal site
      3m 31s
    3. Restoring your Drupal site from backup
      4m 19s
    4. Wiping your Drupal installation clean
      2m 7s
    5. Updating Drupal
      9m 48s
  6. 15m 37s
    1. Using the Administration menu
      6m 21s
    2. Setting site information
      4m 50s
    3. Setting the theme
      4m 26s
  7. 35m 8s
    1. Understanding security and permissions
      7m 2s
    2. Controlling site access with user management
      3m 39s
    3. Creating users
      7m 58s
    4. Setting user profiles
      9m 40s
    5. Creating contact forms
      6m 49s
  8. 19m 19s
    1. Creating your site's basic info pages
      7m 13s
    2. Understanding page layout
      5m 40s
    3. Creating a flexible layout with blocks
      6m 26s
  9. 15m 35s
    1. Monitoring performance
      4m 52s
    2. Recovering from disasters
      7m 37s
    3. Improving administration skills
      3m 6s
  10. 41m 3s
    1. Understanding nodes
      6m 50s
    2. Creating basic content: Stories and pages
      7m 9s
    3. Enabling other content types
      9m 22s
    4. Adding blogs
      3m 49s
    5. Adding forums
      6m 56s
    6. Adding polls
      6m 57s
  11. 34m 50s
    1. Exploring content categories
      7m 45s
    2. Exchanging content via RSS
      9m 47s
    3. Using input filters
      7m 41s
    4. Managing comments
      9m 37s
  12. 38m 5s
    1. Configuring your theme
      11m 27s
    2. Changing your theme's graphics
      4m 59s
    3. Finding and installing a new theme
      8m 56s
    4. Understanding Cascading Style Sheets (CSS)
      5m 56s
    5. Deciphering CSS files
      6m 47s
  13. 22m 41s
    1. Finding modules
      6m 53s
    2. Unpacking and installing modules
      6m 30s
    3. Configuring modules
      3m 50s
    4. Implementing complex modules
      5m 28s
  14. 32m 12s
    1. Ensuring automated updates with poormanscron
      3m 11s
    2. Defining custom content types with CCK
      12m 54s
    3. Stopping spam using a CAPTCHA
      10m 43s
    4. Using a WYSIWYG text editor
      5m 24s
  15. 22m 18s
    1. Getting around with multilevel menus
      7m 26s
    2. Building custom menus
      5m 42s
    3. Creating easy-to-navigate books
      9m 10s
  16. 20m 19s
    1. Changing page templates with PHP
      8m 15s
    2. Using PHP in content
      5m 20s
    3. Implementing PHP snippets
      6m 44s
  17. 10m 15s
    1. Launching your site
      5m 52s
    2. Joining the Drupal community
      4m 23s
  18. 14s
    1. Goodbye
      14s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.