Skip to main content

Profile template

Description

The profile template is used by the Profile Widget.

Control classes

ClassDescriptionRequired
mambo-ctrl-earnDisplays the "How do I earn points?" popup when clickedNo
mambo-ctrl-giftDisplays the Gift Widget in a popup when clickedNo
mambo-ctrl-pointDisplays the points tooltip with the current points description when clickedNo
mambo-ctrl-prog-*Element where tab progress (completed/total items) is injected. The * is replaced with: levels, missions, achievements, coupons, or a custom value derived from tab tags (joined with underscores)No
mambo-ctrl-prog-bar-*Element where progress percentage style is applied (width: xx% !important) to create progress bars. The _ follows the same pattern as mambo-ctrl-prog-_No
mambo-ctrl-tabIdentifies individual tab items. Should be on the same element using the mambo-ctrl-tab-* classNo
mambo-ctrl-tab-*When clicked, renders the grid template into the mambo-ctrl-tab-content element. The _ follows the same pattern as mambo-ctrl-prog-_No
mambo-ctrl-selectedApplied to the last clicked mambo-ctrl-tab-* element. Default is mambo-ctrl-tab-missionsNo
mambo-ctrl-tab-contentElement where missions, levels, achievements and coupons templates are injected. Default contains the missions slider templateYes
mambo-ctrl-mission-detailsElement where the mission details template is injected when a mission item is clickedNo

Template data

VariableDescriptionType
userUser data object with basic user information. For complete details, refer to the User API documentationObject
isLoadingFlag indicating whether user data is still loading. If true, the template will re-render once loading completesBoolean
tabsList of tabs to render in the profile. Each tab contains ID, title, tags, data, and progress informationArray
pointsList of points unlocked by the current userArray

Implementation example

This example shows a basic profile template with tabs and points display:

JavaScript

Customisation options

Consider these enhancements:

  • Adding profile images and personal information
  • Implementing custom tab styles based on completion status
  • Creating interactive progress bars with animations
  • Adding filtering options for rewards and achievements
  • Incorporating social sharing functionality