Site-specific taxonomies

Taxonomies are supported in multisite mode. You can customize the taxonomy per site, for example, you can set different categories for different sites, while using the same taxonomy.

When a taxonomy is set to be used on a specific site only, all existing relations between the taxa and their content items are removed and a new set of taxa is created for the specific site only.

NOTE: The original taxa are still available and visible on all other sites.

The code sample below shows how to set Categories to be used on a specific site and how to duplicate the items from one site to another, based on specific rules. In this example, the Categories taxonomy is set to be specific for Site 2. After that, only the food category and its children are copied from Site 1 to Site 2.
Once the Categories taxonomy is set to be specific for Site 2, it is shared with Site 3, so that all taxonomy items get shared and synced between both sites. Use the following code sample:

 

To retrieve taxonomies used in a specific site, the TaxonomyManager method GetSiteTaxonomy resolves the correct taxonomy instance of a site. If no site is specified, the site from the current context is used.
In order to get the specific taxonomy used in Site 3, the sample above passes to the method the Categories taxonomy, obtained by name, and the ID of Site 3. In this scenario, the ID of the resolved Categories taxonomy for Site 2 and Site 3 is the same, since they share this taxonomy.
If you retrieve Categories taxonomy for Site 1, it will be the same one that you have specified as argument, because it has never been set to be specific for Site 1.

The above scenario is explained by the following chart:
multisite_taxonomies

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

Delete taxonomies