For developers: HierarchicalTaxonField
HierarchicalTaxonField is used when you want to associate a content item with a hierarchical taxon (i.e. category). Built-in content items have Category and Tags fields available, but you can also create custom fields for all modules, which are of type "classification". With all those, you can use HierarchicalTaxonField.

HierarchicalTaxonField in Write mode, used to select a category for a news item.

HierarchicalTaxonField in Read mode, showing the categories associated with a news item.
Using HierarchicalTaxonField in your static module through definitions
Taxonomies and taxa are associated with content items through the creation of custom fields, no matter if you're developing a static module or a dynamic one. The difference is in the way you create the definition. With a static module, you need to do it with the following code:
var categorySelectorField =
new
HierarchicalTaxonFieldDefinitionElement(section)
{
ID =
"categoriesFieldControl"
,
DataFieldName =
"Category"
,
DisplayMode = FieldDisplayMode.Write,
ResourceClassId =
typeof
(TaxonomyResources).Name,
TaxonomyId = TaxonomyManager.CategoriesTaxonomyId,
WebServiceUrl =
"~/Sitefinity/Services/Taxonomies/HierarchicalTaxon.svc"
,
AllowMultipleSelection =
true
,
WrapperTag = HtmlTextWriterTag.Li,
Title =
"Categories"
,
ExpandableDefinitionConfig =
{
Expanded =
false
,
ExpandText =
"ClickToAddCategories"
,
ResourceClassId =
typeof
(TaxonomyResources).Name
}
};
taxonSection.Fields.Add(categorySelectorField);
As you can see, there are several things that you need to supply to the definition. DataFieldName is the name of the custom field in the model, which will hold the value. TaxonomyId is the ID of the taxonomy you use (it might be a custom one, so it's not always Categories). WebServiceUrl should always be set to the default one of HierarchicalTaxonService. The rest of the properties are just controlling the behavior of the field and should be set according to your preferences.
Using HierarchicalTaxonField for a dynamic field
When you are creating a custom field of type "classification", the choices for a widget to select classification items is available as a dropdown list. If you choose "Tree-like selector", you are in fact choosing HierarchicalTaxonField. You don't need to specify a custom type. You can also choose the taxonomy to work with.
