Template hotspots
Usage
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.
- 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 grouppeachesindustriesgmbh.sharepoint.com/sites/gravity_version_1/(.[^/]+)/.*
- Add tests to verify that all hotpots from subsites will have the same mapping:
URL | Expected mapping |
---|---|
https://peachesindustriesgmbh.sharepoint.com/sites/gravity_version_1/marketing/SitePages/Homepage.aspx | peachesindustriesgmbh.sharepoint.com/sites/gravity_version_1/{GROUP}/SitePages/Homepage.aspx |
https://peachesindustriesgmbh.sharepoint.com/sites/gravity_version_1/dev/SitePages/Homepage.aspx | peachesindustriesgmbh.sharepoint.com/sites/gravity_version_1/{GROUP}/SitePages/Homepage.aspx |
Remember
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:
https://eu25.lightning.force.com/lightning/r/Account/0012o00002XsMlgAAF/view
To have the possibilities to place templates on all SalesForce sites, the ‘Hotspot mapping’ configuration will look like this:
(.[^/]+)/lightning/r/.[^/]+/(.[^/]+)/view
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:
Option | Description |
---|---|
Default Appearance | Not acting as template hotspot. |
Template | if 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 Global | Can 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 mapping | Tests |
---|---|