Q4Widgets API Documentation

q4.person

Creates a list of people for a specific department. Pulls data from the Person List API.
Script link
q4.person.1.0.9.min.js
Source file
q4.person.js, line 2
Requires

Options

url string
The base URL to use for API calls. By default, calls go to the current domain, so this option is usually unnecessary.
languageId
A number representing which language to pull data from. By default it auto detects language.
category string
Set a specific department based off the DepartmentWorkflowId.
Default value
00000000-0000-0000-0000-000000000000
Example
'75a31b9d-5394-4e78-b5a7-7cd3c7bddffe'
tags array
Filter results by tag. Pass an empty array for no filtering.
Default value
[]
itemTemplate string

The itemTemplate template contains the content for each person in the API.

Template includes

  • firstName (string) - First Name
  • middleName (string) - Middle name will contain a space before and after the name if it exists, otherwise a single space will be present.
  • lastName (string) - Last Name
  • bio (string) - Biography
  • url (string) - Person Details URL
  • photo (string) - Image URL
  • thumb (string) - Thumbnail URL
  • title (string) - Person Title
  • highlights (string) - Careers Highlights
  • id (string) - Workflow ID, can be used to build a custom person details page URL
Example: (
'{{#.}}' +
'<div class="person-item">' +
    '<div class="person-image">' +
        '<img src="{{photo}} />' +
    '</div>' +
    '<div class="person-name">' +
        '<h4>{{firstName}}{{middleName}}{{lastName}}</h4>' +
    '</div>' +
    '<div class="person-title">{{title}} - {{highlights}}</div>' +
    '<div class="person-bio">{{{bio}}}</div>' +
'</div>' +
'{{/.}}'
)
beforeRender function

A callback that fires before the widget is rendered.

Parameters
personData array
An array of person data.
complete function

A callback that fires after the entire widget is rendered.