EnglishFrenchGermanSpainItalian DutchRussianPortugueseJapaneseKorean

Google Search

Custom Search

Wednesday, May 5, 2010

Understanding taxonomies for new users

Drupal's Taxonomy (=Categorisation) system might sound daunting, but it doesn't have to be. When all the fancy language is stripped away, Taxonomy is about one thing: organizing your site by attaching descriptive terms to each piece of content.

Those terms might describe what section of your site a particular page belongs to. They might describe what topics are discussed in a given blog post, or what region of the country a photograph was taken in. These terms are organized in separate 'Vocabularies' so that recipe ingredients don't get mixed up with cities in Texas when you're trying to find out what travel-logs were written in Houston, or what soups use potatos.

Setting up these Vocabularies, and the descriptive terms that belong to them, is the first step in organizing your Drupal site. There are different kinds of vocabularies, and understanding how they differ can help you decide the best way to categorize your content.

1. Lists of pre-defined terms -- a 'flat' vocabulary, i.e. Colors: Red, Blue, Green
2. Hierarchies of pre-defined terms -- a 'tree' vocabulary, i.e. Location: United States-Illinois, Europe-France
3. User created terms -- a 'free-tagging' vocabulary, created when content is created

For example, let's say you're setting up a photo portfolio and using Taxonomy to keep things organized. First, you might create a 'flat' vocabulary for basic organization called 'Photo Type.' To that vocabulary, you would add the terms 'Portrait,' 'Stop-Action,' 'Landscape,' and so on. Next, to keep track of where the photographs were taken, you might create a hierarchial vocabulary called 'Location.' To it, you could add terms like 'Europe' and 'United States.' In a hierarchial vocabulary, each of those terms can also have sub-terms like 'France' and 'Illinois.' This makes it possible to tag a photo once with the term 'London' and retrieve it later with a broader request like 'Show me all the photos taken in Great Britain.' Finally, to capture notes about each photograph that would be hard to plan in advance, you could add a 'free tagging' vocabulary called 'Keywords.' Rather than defining the terms in advance, a free tagging vocabulary lets you enter in new terms each time you post a piece of content. If two separate content items use the same vocabulary term, they will both show up when that vocab term is searched or accessed from a menu block.

With those three vocabularies in place, any new photograph you post to your site can be quickly categorized. Whenever you post a new image, Drupal offers you a list of the available terms in the 'Photo Type' and 'Location vocabularies AND a place to type in terms for your 'Keywords' vocabulary. When posting a photo of your brother's wedding, you might select a Photo Type of 'Portrait,' a Location of 'Paris' and type in 'wedding' and 'brother' as keywords.

If you're used to other CMS or blogging systems, these different vocabulary types might be refered to as 'categories' or 'sections' or 'keywords.' It's important to note that nothing requires you to use these different Drupal vocabularies, and different kinds of content can use different vocabularies when it makes sense. News articles and Images might share 'Keywords', but 'Photo Type' obviously only makes sense for one.

Mixing and matching these techniques in Drupal allows you to create the organizational system that best suits your needs. Getting used to it can be tricky at first, but if you take the time to think through your site's organization, the results are worth it.

Masukkan Code ini K1-EY8895-E
untuk berbelanja di KutuKutuBuku.com