Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

Anchor
_idn2n9kiw9jb
_idn2n9kiw9jb
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://docs-v3.strapi.io/documentation/user-docs/latest/getting-started/introduction.html#accessing-the-admin-panelhtml

Anchor
_gfa5ospv60hs
_gfa5ospv60hs
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.

To access Strapi, navigate to your Organization and then click the “Settings” tab. If a “Strapi URL” is properly configured, you should see a “View Organizational Content” link that you can click to open Strapi.

...

Anchor
_27xywzxfyspa
_27xywzxfyspa
Create a New Content Type

See Introduction to Content-Types Builder

Warning

Content-Type names must be unique. If you accidentally (or intentionally) give two Content-Types the same name, this will cause the server to fail and you’ll need to reach out to the #gumband-support channel for some help standing it back up.

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!

Note

After creating a new content type, the API user needs to be granted access to that 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

...

Anchor
_al8x9wglz3u9
_al8x9wglz3u9
Manage Entries for a Content Type

See Introduction to Content Manager

Anchor
_kh0cenxrtwxj
_kh0cenxrtwxj
Define a Strapi Content Setting Type in the Manifest

...

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

...

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

  • type: Always string “StrapiContent” StrapiContent when pulling content values from Strapi

  • contentType: The dynamic content type type’s API-ID from Strapi, made to be plural (include an “s” at the end - see below screenshots): by convention it should be singular, or whatever the original value was entered as when creating the collection type.

  • 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 itemn entry. 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.

...

Anchor
_sk4sx82nr1ax
_sk4sx82nr1ax
Assign Strapi Content to an Exhibit Setting

...

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

...

The following updates are in development:

...

Seamless authentication between Gumband and Strapi

...

Syncing file content between Strapi and Gumband exhibits

...

Content Type Relationships

Strapi allows for content types to contain relationships to one another (see more in the Strapi docs). This is useful to maintain a single instance of each content type, and then share or reference those items within other content types.

When connecting these content types to Gumband, by default the Strapi API only returns nested entries one level deep. Additional business logic can be added to your Gumband-Strapi instance to be able to query more complex data structures. Talk to your Gumband representative for more details.

Content Entry Customization

Each strapi field can be configured with a unique label and description. See the video walkthrough below:

...