In DotNetNuke version 5.3, we introduced the concept of a centralized Content store, together with the ability to apply Taxonomies (categories) to the content.  We have extended this in DNN 5.4 by completing the MetaData API as well as adding Folksonomy (user tags).

In this series of blogs I will explain how developers can take advantage of these new features in their own extensions.

But first lets take a look at how the pieces work together.

Defining Taxonomies

Taxonomy is defined as “the practice and science of classification” – Wikipedia, while Folksonomy is defined as “collaborative tagging” – Wikipedia

Usually, taxonomy refers to the practice of using hierarchical categories applied to the content by a “content editor”, while folksonomy refers to the practice of free-form tagging of content by users. 

In DotNetNuke, while we expose both of these at the presentation layer, in the API and Data Layer they are implemented using a common data structure.

Lets take a look at the new Taxonomy Manager, which can be found on the Admin menu.

Figure 1: The Taxonomy Manager in DNN 5.4
TaxonomyManager_1

The initial view displays a list of the defined Vocabularies – In DNN 5.3 the list is empty, while in DNN 5.4 there is a single System Vocabulary defined called Tags.

To create a new Vocabulary click on the Create New Vocabulary button.

Figure 2: Creating a New Vocabulary
TaxonomyManager_2

You can then enter a name and description for the Vocabulary and define whether it is a Simple or Hierarchical Vocabulary and whether it is an Application scope Vocabulary (host users only) or Portal scope Vocabulary.

Once you have added the Vocabulary you will return to the main Vocabulary list.  To add “terms” to the Vocabulary select the Edit link.

Figure 3: Editing a Vocabulary
TaxonomyManager_3

You can add “terms” to the Vocabulary by selecting the “Add Term” button.

Figure 4: Adding a Term to the Vocabulary
TaxonomyManager_4

You can then enter a name and a description for the term and click Save.

To edit an existing term you can select the term from the Terms list.

Figure 5: Editing a Term in a Hierarchical Vocabulary
TaxonomyManager_5

Note figure 5 shows a hierarchical Vocabulary, where the terms are displayed in a treeview, and you can define a Parent Term for the term,  while Figure 6 shows a simple (flat) Vocabulary of colors where the terms are displayed in a list, and there is no Parent Term option.

Figure 6: Editing a Term in a Simple Vocabulary
TaxonomyManager_6

 

Using Taxonomies

Now we have defined a couple of Vocabularies, how do we use them.  Currently only two types of Content exists which can be “tagged” – Modules and Pages/Tabs.  By providing support for tagging at the Page and Module level through Page Settings and Module Settings, modules do not need to be updated to support taxonomies.  Modules, like Blog, Forum and Announcements which have multiple Content Items will need to be updated to support tagging at the item level though.

In figure 7 we can see how the terms “MP3 Players” from the Electronics Vocabulary and “Red” from the Colors Vocabulary can be applied to the Page.

Figure 7: Applying Taxonomy Terms (Categories) to a Page
TaxonomyManager_7

Once the page has been categorized with some terms, if the page skin has the new Tags Skin object in it (like the base Index skin in Minimal Extropy), the skin object will display the list of categories that have been applied to the page.  (Note the skin object can be styled in many different ways though css.  In this case we are using a folder icon to indicate “categories” and a luggage label to indicate tags.

Figure 8: The new Tags Skin object
TaxonomyManager_8

 

Adding Tags (Folksonomy)

Folksonomy is the practice of allowing users to enter their own tags in order to categorise or “tag” the content.  The Tags skin object has a property/attribute – AllowTagging – which defaults to true that allows users to enter their own tags.  The user, would click the Add Tags button.

Figure 9: Entering new Tags
TaxonomyManager_9

The user could then enter a comma-delimited list of tags – click Save and the “Tags” would be saved (Figure 10)

Figure 10: The Tags Skin Object with Two New User-entered Tags
TaxonomyManager_10

 

Tags System Vocabulary

It was briefly mentioned at the beginning of this article that there is a single System Vocabulary created when DNN 5.4 is installed.  This Vocabulary is where the User entered Tags are stored.

Figure 11: The Tags System Vocabulary
TaxonomyManager_11

There are a number of advantages of using a special System Vocabulary for storing user entered tags.  One is that both taxonomy terms and folksonomy tags are treated in the API and Data Layer in the same way.  This means that we only have to manage one relationship between content and terms rather than two separate relationships.  The second benefit of treating tags in this way is that an admin can “manage” the tags – ie remove any offensive or inappropriate tags, or correct spellings of tags, by using the Taxonomy Manager UI.

I hope this has given you an idea of what the new Taxonomy/Folksonomy features can do.  In future blogs I will take a deep-dive into the API and Data Layer of this new sub-system and show you how you can build rich content driven modules.


Comments


April 10. 2010 12:25
James Burke
Useful related post worth a read re: tags etc. http://stdout.be/2010/tags-dont-cut-it/


April 11. 2010 19:45
Bruce Chapman
Charles - will a consuming module be able to be notified of events, like the deletion of a Tag?  If the module needs to handle the tags within the module code itself, it's likely that building extensions to this will involve foreign key relationships in the database.  If a tag is deleted through moderation, then the downstream modules would need to 'know' about that.


April 12. 2010 06:56
cnurse
@Bruce

For the most part modules which implement this feature will not need to do anything other than add the appropriate controls.  I will - hopefully - make that clear in a later blog when I get down to the details of developing modules using these features.


April 14. 2010 03:11
Navnish
Charles - I am new to DNN and like the idea of categorization. I have a couple of questions: How do I know if my skin support "new tag" object? How can I access it?

Also, I was able to create taxonomies and term. I was also able to categorize my pages based on the tags. But now I want to see all contents of a particular tag. How can see them or list them?
Navnish


April 14. 2010 07:12
cnurse
@Navnish

Most current skins won't have the Tags skin object - as it is new.  You will have to add it yourself.

Regarding getting a list of items categories/tagged - this functionality is available (in 5.4) by clicking on one of the links in the tags skin obejct


April 14. 2010 12:11
Navnish
Thanks Charles. "You will have to add it yourself". I could not figure out how to add it. Can you help?

Also is 5.4 available for download?

Thanks for your help.

Navnish

Comments are closed

 Search Blog

 Calendar

«  February 2012  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011
View posts in large calendar

 Tags

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 Thoughts from the Wet Coast