Tailwind Logo

Chane item's icon

Experience Manager (XM)

Published: 2022-04-20

Until now, when you created an item, an icon like a document was always set. It is possible to set an icon for an item, but it can be time-consuming to work on this every time.

Item Icons

In Sitecore's item settings there is a section called Icons. If you look in the content editor, you will see that there is an Icons section.

icon01.png

Specifying an icon from this menu allows you to change the icon displayed in the content tree.

icon02.png

Specify icons in templates

This time, we will use the template that we had previously created. Click Icons in the Settings menu to see the drop-down choices. You can also see icons that you have used before and other icons that are recommended.

icon03.png

This time, click on another icon to open a dialog. Select the Icons tab of the dialog that opens, and you will see the following screen.

icon04.png

When you specify an icon, you will see in the dialog that the file path for the icon changes. Selecting the drop-down box at the top groups the various types of icons and allows you to select and switch between them.

icon05.png

In this case, we will specify WordProcessing/32x32/align_centre.png with a text icon.

icon06.png

You will notice that the item's icon changes when you specify it.

icon07.png

Standard Value Verification

The first step is to create a new item. Insert item, specify template. You can already see that the template icon has changed.

icon08.png

You can see that the resulting item has a new icon as shown below.

icon09.png

Checking Standard Value Values

Then there is the item whose icon was individually designated at the beginning of this article. In the above screen, the item is called This is standard value test. The icon is in a different form. You can see that the individually configured icon has priority.

To see where this value is set, check View - Standard Fields in the content editor.

icon10.png

It will be possible to refer to standard fields that are set other than the fields that the item has.

icon11.png

You can see that an icon file is specified for the icon defined in Appearance (appearance and behavior).

icon12.png

This time, click on Clear to delete the individually set data and save the item. You will then see the icon specified in Standard Values being used.

icon13.png

Find icons quickly

As for icons, you can get used to them and understand what they are, but you don't actually have to get used to them. There is a site called Sitecore Icon Search that allows you to search by keyword.

icon14.png

If you know the path to the icon, you can set it without having to search for it. Checking JSS Icons Only will limit the icons to those available in JSS, and will also allow you to see the name under which the icon is to appear.

icon15.png

There is also a browser extension that allows you to check it without going to the site.

icon16.png

Bookmark this site, as it is very useful.

Summary

In this article, we introduced the procedure for specifying standard icons for items. By setting icons that match the format of the data you are creating in the template, you will be able to not only understand the data you are storing in a folder, but also identify the type of item by its appearance.

Related article

Tags