Skip to main content

Simple profile template

Description

The simple profile template renders the simplified version of the user profile. See the Header Widget documentation for an example.

Control classes

ClassDescriptionRequired
mambo-ctrl-simple-profileIdentifies the container element for the simple profile. Used to position the profile in the center of the screen and reapplied whenever the screen is resizedNo
mambo-ctrl-closeDetaches the simple profile from the DOM when clickedNo
mambo-ctrl-earnDisplays the "How do I earn points?" popup when clickedNo

Template data

VariableDescriptionType
userThe user data object containing all basic user information. For complete details, refer to the User API documentationObject
userNameThe user's name to be displayed, as determined by the Header Widget configurationString
isLoadingFlag indicating whether user data is still loading. If true, the template will re-render once loading completesBoolean
levelsLoadingFlag indicating whether levels are still loading. Once loaded, control classes are used to inject level information into the viewBoolean
primaryLevelContains progress information for the primary level (defined using levelGroups in widget initialisation). Includes current level, next level, percentage progress and moreArray
pointsList of points unlocked by the current userArray

Implementation example

This example shows a basic simple profile template:

JavaScript

Customisation options

Consider these enhancements for your simple profile template:

  • Adding user avatar or profile picture
  • Displaying level progress bars
  • Including achievement badges or recent rewards
  • Showing total points across multiple point types
  • Adding links to full profile or account settings