Template hotspots


There are hotspots, their callout's respectively, which should appear on more than one page...

Let's take this Edit button:  it appears on many pages, but none the less you would like to explain it!

For this cases there exists the Templating feature where a hotspot can be used as template for a hotspot group. Template hotspots and their callouts are visible on all pages that fit the mapping.

Here's how

Admin site

This requires admin access and may be configured by gravity.global or your gravity admin.

  1. First of all we need to configure our backend to accept template groups that respect a given mapping.
    Add a hotspot mapping of type REGEXP which includes a group


  2. Add tests to verify that all hotpots from subsites will have the same mapping:
URLExpected mapping


Expected mappings do not have a protocol since it is stripped!

Such template groups can also be placed in between URL elements. Here’s an example of SalesForce:

The URL structure of SalesForce looks like this:


To have the possibilities to place templates on all SalesForce sites,  the ‘Hotspot mapping’ configuration will look like this:


In such a case, please make sure not to delete/strip the path, since we need to save that path.

Adding a template hotspot

If templates are activated for a page and current user is a GOAL_OWNER then a new item "Use as template" is visible in Ring Menu:

Default AppearanceNot acting as template hotspot.
Templateif configured as described above, the hotspot will act as a template for the particulare site/subsite configuration. if no configuration is available that option will not be available.
Template GlobalCan be used without any specific configuration. If choosen, GRAVITY will try to place that hotpsot on any page for that site. Use this configuration to place hotpsots on headers or similar elements that apears everywhere.

Requirements for nerds

Template hotspots can be added to a page if:

  • hotspot mapping for the page is type of REGEXP and it has at least one group configured
  • current user has role GOAL_OWNER

More examples of template groups

Hotspot mappingTests