Experience Type
An Experience Type extension lets administrators create new Showpad Experiences from your app. This page covers how to declare the extension in your manifest and implement the required files.
Declare in Manifest
Add the experienceTypes property to your manifest.json:
{
"experienceTypes": [
{
"extensionKey": "my-experience",
"name": "My Experience",
"description": "Excellent description",
"resources": {
"folder": "my-experience"
}
}
]
}
Required Files
The source code for your Experience Type lives in the resources folder you defined in the manifest. The folder contains all of your extension's files (JS, CSS, images, etc.), including two required files:
Index
The index.html file is the entry point of your Experience Type. When the extension opens in Showpad, it renders inside
an iframe with the configUrl query parameter appended to the URL:
index.html?configUrl={path_to_config_file}
Use the Showpad.parseConfig() SDK function
to fetch the configuration at that URL:
const config = await Showpad.parseConfig();
Config
The config.json file defines what content your Experience Type exposes to administrators. When an administrator
creates or edits an Experience in the Admin App, they can change the values defined here.
| Property | Description |
|---|---|
version | The version of the configuration structure. Currently 1. |
labels | Text and copy shown in the Experience. |
contents | Links to Showpad content. Supported types: asset, tags, channel, folder, url, page, page-tags. |
{
"version": 1,
"labels": {
"homepage": {
"title": "Your own Experience",
"subtitle": "How to get started with your own Experiences."
},
"slide1": {
"title": "Getting Started",
"contents": "This Experience thing is going to be YUUGE"
}
},
"contents": {
"slide1": {
"presentation": {
"type": "asset",
"value": "d5d7736f4ecf8106f0be8ba35d11a2c4"
}
}
}
}
Next Steps
- Define Experience Config - configure the labels and content your Experience exposes
- Experience Type concept - full reference for the extension type
Was this page helpful?