Sunday, July 24, 2011

MatchPoint - Configuration of Tag-Icons

Each Tag in MatchPoint can have its own icon. The configuration of the icons can be found in the MatchPoint Administration sitecollection, which hosts the MatchPoint instance.

MatchPoint Instance Administration in the Site Settings

The icons for the tags must be located in the images subfolder of 14hive folder in each web frontend server. The easiest way to open the images folder is to paste the following command line into the explorer bar:
"%COMMONPROGRAMFILES%\microsoft shared\web server extensions\14\Template\Images"
The images will not be resized so if you create your own images please ensure that they have the right format,
16x16 I think. Within the images folder you can create your own subfolder structure for your images.

Images folder in 14hive

As an example we have the following Tag structure. Sprache (Language) is a toplevel tag. It has 3 other child tags : German (Deutsch), French (Französisch) and Italian (Italienisch).


After you've copied all images to the images folder, you need to create a mapping between the tags and the images. Therefore open the "Site Settings" page of the root site in the MatchPoint Administration sitecollection. Under "MatchPoint Instance Administration" open the "MacthPoint Configuration" link. Within the configuration settings click on "Icons" to open the tag icon configuration and create a "Mapping".

In the above configuration we want to have a french flag icon for the french tag. Because "French" is a sub tag of "Language" we have to make a XPath Query like "Language/French". Use the tag names for the selection and not the tag keys.

The filename is the path to the image file in the sharepoint images folder.

After creating the mappings, you have to run the Matchpoint Tagimport timer jobs , so MatchPoint can create the assosiations between the tag and the icon.

You can also use asterisks in your pattern. If you for instance use the following pattern "Links/**", each child tag unter "Links" will have the same icon. In XPath this pattern means "select recursively all child items".

Pattern with asterisk
Result of the selection pattern

When you use only a single asterisk in your pattern, like "FileExtension/*", only the first child tags directly below the tag will inherit the icon.

You can also use "{0}" placeholder in the filename to create dynamic mappings. The "{0}" placeholder will be replaced by the tagname. If you for example have tags with the name "green, red and yellow" to display a status and you saved tag images with the name status_red.gid, status_green.gif and status_yellow.gif in the 14hive images folder, you can use "status_{0}.gif" for the filename .