Summary template
Description
This template displays a user's activities summary in the Profile Widget, showing all activities associated with the user.
Control classes
| Class | Description | Required |
|---|---|---|
| mambo-ctrl-timeline | Wrapper for the entire timeline | Yes |
| mambo-ctrl-missions | Toggles mission filtering. When clicked again, reverts to previous filter settings. Toggles mambo-ctrl-selected class based on filter state | No |
| mambo-ctrl-achievements | Toggles achievement filtering with the same behavior as mambo-ctrl-missions | No |
| mambo-ctrl-levels | Toggles level filtering with the same behavior as mambo-ctrl-missions | No |
| mambo-ctrl-gifts | Toggles gift filtering with the same behavior as mambo-ctrl-missions | No |
| mambo-ctrl-behaviours | Toggles behaviour filtering with the same behavior as mambo-ctrl-missions | No |
| mambo-ctrl-kpis | Toggles KPI filtering with the same behavior as mambo-ctrl-missions | No |
| mambo-ctrl-selected | Applied to filter buttons that are currently selected | No |
Template data
| Variable | Description | Type |
|---|---|---|
| isLoading | Flag indicating whether user activities are still loading | Boolean |
| data | Array of activities performed/unlocked by the user. Extends the default Activities API model to facilitate summary rendering. Monitor the mambo.data.activities event to examine the data structure | Array |
Implementation example
This example shows a basic summary template with loading state handling:
JavaScript
Customisation options
Consider these enhancements:
- Creating visual timelines with activity icons
- Adding date filtering and searching
- Implementing grouping by activity type
- Adding interactive elements for detailed activity views
- Creating visualisations for activity patterns over time