Contact Us

Data has become more extensive, and having access to it might not be so easy at times. And this is where taxonomy comes into the picture. It not only optimizes the consistency, classification, and search, but also helps with navigation and metadata. Taxonomies are typically hierarchical structures used to organize and identify data in a meaningful manner. In Sitecore, you can employ taxonomies in domains like marketing where numerous goals, events, and campaigns run simultaneously.

Creating taxonomies will help you track the activities on the website while providing an overview for each function. Such meaningful insights help you comprehend the behavior of your users to cater to them more efficiently. In the Sitecore Experience platform, taxonomies can easily be created and maintained. This enables you to categorize content and make it more accessible for the users. Let's find out how to create custom taxonomies on Sitecore.

Create a Custom Taxonomy and Options List and associate it with the Asset Detail Page

Taxonomies are a subset of metadata. The main differentiator with other metadata fields is that taxonomy can have many hierarchical values (e.g. a tree structure) and can drive security. Taxonomy hierarchical levels can be imported to an existing Taxonomy via the Excel import functionality. In this example, an empty primary taxonomy is created, named BasicTaxonomy

Image 1

Image 2

  • Click on the new taxonomy and give your taxonomy a name and level. Click on create.

Image 3

Image 4

  • Click on the Show definition button to see the initial default definition.

Image 5

  • Any member shown here can be utilized in the import. Further members can be added via the New Member button

Image 6

Excel Import using the Creation component

  • Begin by selecting Pages under the Manage.

Image 7

  • When Pages opens, proceed to click on New Subpage.

Image 8

  • On the New subpage modal; the required Page type is Blank and an identifiable Name is a mandatory field. Once the necessary values have been entered click on Create.

Image 9

For an Excel import to be performed, a Creation component must be added to the page. On the newly created page layout tab:

  • Click on the + sign on the Main Zone of the page.
  • From the list of available page components, choose the Creation component.
  • Enter a name for the new component and toggle to active making the component Visible.
  • Click on Add.

Image 10

The Creation component must be edited:

  • Click on the Creation component's actions button.
  • Select Edit  on the displayed menu.
  • Toggle the Upload files option to active.
  • Proceed to toggle the Import Excel option to active.
  • Click on Save and Close to save the configuration of the Creation component.

Image 11

The new page can now be viewed via the View Page on the Layout tab of the new page:

Image 12

The new page has an option to Add. Clicking on this button and the option to Import Excel:

Image 13

The Excel sheet is imported by:

  • Selecting Import Excel.
  • Navigating to the Excel sheet, subsequently highlighting the file and clicking on Open.
  • Once the file has been imported, click on Done.

Image 14

Single-level Taxonomy using Excel Import

A new Excel sheet must be created to import into this new taxonomy.

 
 
 

identifier

 
 
 
 

TaxonomyName

 
 
 
 

TaxonomyLabel#en-US

 
 

BasicTaxonomy.Province

 
 

Province

 
 

Province

 

  • Identifier: The identifier for the new taxonomy level is created using basic dot notation to associate the new taxonomy level with the Taxonomy. In this example, the name of the new level is Province and the taxonomy is named BasicTaxonomy.
  • TaxonomyName: The taxonomy name is the name of the taxonomy level.
  • TaxonomyLabel#en-US: This is the value to provide the optional display label of the taxonomy level. If there are other Portal languages, these can be imported in the same worksheet.

 

Once the worksheet has been imported, the taxonomy is updated:

Image 15

Further values of Taxonomy Entities can be added. In the following example, additional fields are added based on the initial taxonomy definition of BasicTaxonomy.

Once successfully imported, these values are created in the Taxonomy element.

Image 16

If a new member is added to the taxonomy.

Image 17

This new member can be used in the import. After the import this data is included in the import.

Image 18

As mentioned earlier, multiple labels for portal language labels can be imported in the same worksheet. The path of the Portal language is used.

Image 19

Multi-level Taxonomy using Excel import

To import a taxonomy with levels, an additional field must be added to the worksheet, this is the ToSelf field that is shown in the definition of the taxonomy. This sequence of actions is the advised method.

Image 20

This flag is included in a field as BasicTaxonomyToSelf:Parent, where BasicTaxonomy would be replaced by the name of the user's taxonomy. Noting that BasicTaxonomy is the name of the example taxonomy, this is appended with ToSelf. The parent relationship of the value is a Parent to the new taxonomy entity, so the flag of :Parent is included). The cardinality of the relationship is, therefore defined as OneToMany, this means that one BasicTaxonomy entity can be linked to Many BasicTaxonomy sub-entities.

The example worksheet is amended to include this new detail. The identifier of the parent is used to define the path. So in the below example:

  • Province is at the first level of the taxonomy.
  • Leinster is a child level of Province so the identifier of Province is entered in the BasicTaxonomyToSelf:Parent cell.
  • Dublin is a child level of Leinster, so the identifier of Leinster is entered in the BasicTaxonomyToSelf:Parent cell.

This worksheet is imported, and the hierarchical levels of the taxonomy are set as expected.

Image 21

Image 22

Summing Up

A taxonomy structure allows you to create a custom taxonomy according to your business needs. Sitecore provides every important tool and feature to manage taxonomies, from creation to assigning taxonomies to content items and utilizing them to filter and display content. Get in touch with us for a free consultation for any Sitecore-related queries you might have.

Need Help?