Sub Categories

Plugin Categories can have sub categories which will be used to add structure to your list of actions, events and connectors.

Key Type Req. API Description
id Text yes 7.0 This is the id of the sub category. It is used to identify the sub category within Touch Portal. This id needs to be unique across plugins. This means that if you give it the id "1" there is a big chance that it will be a duplicate. Touch Portal may reject it or when the other state is updated, yours will be as well with wrong data. Best practice is to create a unique prefix for all your sub categories like in our case; tp_subcat_groceries.fruit.
name Text yes 7.0 The name of the sub category. This name will be used to display the category in the actions lists. It can may be used in different systems as well.
imagepath Text no 7.0 This is the absolute path to an icon for the category. You should place this in your plugin folder and reference it. If you use %TP_PLUGIN_FOLDER% in the text here, it will be replaced with the path to the folder containing all plug-ins.

Image specs:
Format32bit PNG
Size24x24
ColorWhite icon with transparent background


Although colored icons are possible, they will be removed in the near future.

State Object JSON Structure

{
  "id":"tp_subcat_groceries.fruit",
  "name":"Fruit",
  "imagepath":"%TP_PLUGIN_FOLDER%TPExamplePlugin/images/icon-24.png"
}

This shows a JSON of a sub category for a fictive groceries plugin. This will represent the sub category of all fruits from the groceries shop.