Icon


# Icon

Icon is type of WebResource. We use them mainly in SiteMap to improve user experience.

Site Map Icons

# Conventions

# Code placement

There are 2 files. One with .svg file type and second with .svg.data.xml file type. Both of them have to be stored in same folder:

…\CDS\WebResources\

# .svg file


.svg file contains definition of the Icon. There are plenty of icons in TALXIS.

In case you need to add a new one you are free to use Office UI Fabric Icon Generator. We have this handy tool pinned in tabs in INT006 - TALXIS Apps team (General channel).

Link: Office UI Fabric Icon Generator (opens new window)

# .svg.data.xml file


# Icon Id

Make sure that GUID in <WebResourceId> is unique.

Example:

<WebResourceId>{3d4967df-91a3-4f86-ba43-f7cc78ad97bd}</WebResourceId>
1

# Name Parameter

This parameter references the definition of the icon so it has to match with .svg file name.

Example:

<Name>talxis_taskicon.svg</Name>
1

# FileName Parameter

This parameter should reference to the defition of the Icon. Hovewer we find out that mistakes in this parameter do not cause failure of the icon.

On the other hand please be responsible and use this format:

/WebResources/{Icon File name}{svg}{WerResourceID in UpperCase}

Example:

<FileName>/WebResources/talxis_taskiconsvg3D4967DF-91A3-4F86-BA43-F7CC78AD97BD</FileName>
1

# Presentation/Model

Icons are somehow part of presentation layer but it will be better to put their definitions in model layer. In TALXIS you will often find icons in presentation layer but we try to put them in model nowadays.

You can use an icon as main icon for an entity. Since entity definition is placed in model layer you have to put your icon in model layer too.

Icon Placement

You can see that in this case one icon is placed in MODEL (model layer) and one in APPS (presentation layer).

# Presentation Icons

To set specific icon for SubArea of a AppModule (opens new window) you have to add Icon and VectorIcon parameter which is referencing the icon.

Example:

<SubArea Id="HugeUnitsSubArea" ResourceId="SitemapDesigner.NewSubArea" VectorIcon="/WebResources/talxis_producticon.svg" Icon="/WebResources/talxis_producticon.svg" Url="/main.aspx?etn=talxis_buildingunit&amp;pagetype=entitylist&amp;viewid={34bffe6b-9e30-eb11-a813-0022487f4737}" Client="All,Outlook,OutlookLaptopClient,OutlookWorkstationClient,Web" AvailableOffline="true" PassParams="false" Sku="All,OnPremise,Live,SPLA">
	<Titles>
		<Title LCID="1033" Title="Huge Units" />
	</Titles>
</SubArea>
1
2
3
4
5

# Model Icons

The icon with file name talxis_contract.svg (picture above) is referenced in Entity.xml of talxis_contract entity:

<IconMediumName>talxis_contract.svg</IconMediumName>
<IconSmallName>talxis_contract.svg</IconSmallName>
<IconVectorName>talxis_contract.svg</IconVectorName>
1
2
3

Thanks to the reference in Entity.xml this icon will be used by default in SiteMap(Just in case you reference the entity. If you specify URL you need to do go same as with presentation icons). You do not have to reference it in SiteMap as you have to do with icons in presentation layer.

However you are able to set only one icon for the entity. To change the icon you have to use icons in presentation layer.