Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Strapi CMS Integration

To expand the content management capabilities of Gumband, another CMS system called Strapi is shipped as a part of the overall Gumband solution. Within Strapi, custom content types can be created with a variety of field options, and then content can be managed of that content type. The content managed in Strapi is then shared within an Organization and can be assigned to exhibit settings, propagating to any SDK listeners in real time.

Strapi Documentation: https://strapi.io/documentation/user-docs/latest/getting-started/introduction.html#accessing-the-admin-panel

Access Strapi

Access Strapi at your organization's Gumband domain followed by /strapi ie. https://tiktok.gumband.com/strapi

Temporarily, another login is required and is different from the Gumband authentication system. Ask your platform admin to create credentials for you. The Gumband team is working on a seamless Oauth integration between the two systems.

Create a New Content Type

See Introduction to Content-Types Builder

Note that content type fields can contain relationships to other content types. In this situation, the Gumband-Strapi system will only return values to the SDK one level of nesting deep. For example, let’s say “CategorySets” contains many “Categories” contains many “GameTitles”. If the manifest contains a setting for “Categories”, the SDK will receive the “GameTitles” values inside of the “Categories” object in the JSON payload. However, if the manifest contains a setting for “CategorySets”, the SDK will ONLY receive the “Categories” values inside of the “CategorySets” object, and NOT the “GameTitles” values.

TODO: allow access to gumband API user!

After creating a new content type,

Click “Settings” on the left nav, then “Roles” under the “Users & Permissions Plugin” section, then the pencil icon to the right of the “Public” role

Scroll down to the “Permissions” section, expand the “Application” section, and “Select all” for all content types. Then click the green “Save” button in the top right.

Manage Entries for a Content Type

See Introduction to Content Manager

Define a Strapi Content Setting Type in the Manifest

Manifest settings can be defined as “StrapiContent” types and should take the following format:

{
   "id": "unique-manifest-id",
   "type": "StrapiContent",
   "contentType": "content-type-from-strapi",
   "contentValue": 3, // optional
   "displayFieldName": "DisplayField",
   "display": "Strapi Content Test"
}

Description of fields:

  • id: A unique string (no spaces) to identify this setting against others for this exhibit

  • type: Always string “StrapiContent”

  • contentType: The dynamic content type from Strapi, made to be plural (include an “s” at the end - see below screenshots)

  • contentValue: The ID value of the content item that should be the value of this setting or null

  • displayFieldName: The string name of the field that should be used for selection within the Gumband UI

  • display: The setting label for within the Gumband UI

To find the contentType for the manifest, select the content type under “Collection Types” in the left navbar and then select a single content item. Use the value next to “API ID” under the item header, and add an “s” to make that string plural. In this example, you would use contentType “oscar-test-types” in the manifest.

Assign Strapi Content to an Exhibit Setting

After defining a custom content type and loading content within Strapi, and then running an exhibit with a properly configured “StrapiContent” setting type in the manifest, you are ready to change that setting’s values dynamically in Gumband.

Open the exhibit UI within Gumband and navigate to the Settings tab. Find the relevant setting and select the value from the dropdown. After hitting Save, the value will update and the SDK should receive a real time notification with the value.

(A number of OscarTestType items are loaded in Strapi)

(Two StrapiContent “oscar-test-types” settings are defined in the manifest)

(Values from the Strapi content items’ “Name” field are displayed as options for the setting within the Gumband UI)

(After saving an updated setting value, the SDK receives a real time callback with the setting value)

Gumband-Strapi Integration Roadmap

The following updates are in development:

  • Seamless authentication between Gumband and Strapi

  • Syncing file content between Strapi and Gumband exhibits

  • Push updates to the SDK when a content item is changed within Strapi that is used as the value of a Gumband setting

  • No labels