Associating Items With Taxa
Associating a content item with a Taxon
The content organization in Sitefinity is entirely based on Taxonomies. As shown in Flat Taxonomies and Hierarchical Taxonomiesarticles, the Tags and Hierarchical Categories are implemented as taxonomy. That said, when a content is tagged or categorized, a taxon is being associated with it. Here is how this association could be done via code:
//Generic Content namespaces
var taxManager = TaxonomyManager.GetManager();
var taxonId = taxManager.GetTaxa<FlatTaxon>().Where(t => t.Name ==
var contentManager = ContentManager.GetManager();
var allContent = contentManager.GetContent();
In this example, we are adding a tag named Book, to all content items. Note the content Organizer class - every content item type has it, in this case pages.
This approach can be used with all types of Content in Sitefinity, as well as pages.