Using User-Specific Data

Some pages, like /applications, require data specific to the current user to render properly.

For these views, you should use a function for the template, and provide data as an argument. The user-specific data will automatically be passed into the function when it runs.
portal.setTemplate('apps', function (data) {

    // Log the user-specific data to the console
    console.log(data);

    // Your template goes here...
    var html =
        '<main class="main has-apps" id="main">' +
            '<h1>Hello, world!</ha>' +
        '</main>';

    // Return the html string
    return html;

});