Creating WebApps from the CLI

To create WebApps that Siteglide will load correctly in Siteglide Admin, you will need to upload the following two files with their required fields.

Files

The files below have to be saved in their relevant locations and synced in the order below. Depending on the WebApp ID that you'd like to use, replace 99 with the correct ID, in this case 99 is just an example. Keep in mind that if you already have WebApps in the site you are working on then then some WebApp IDs may already be reserved.

Schema File

The first file you will need is one that defines the schema, this will be stored in the location:

marketplace_builder/custom_model_types/webapps/webapp_99.yml

with the contents:

YAML

The above are all the default fields that are needed, the last field is an example of a standard text field. Please see the Field Types document for all the relevant types.

Form Configuration

A form configuration is then used to show the relevant WebApp in Siteglide Admin and also allow you to add items.

marketplace_builder/form_configurations/webapps/webapp_99.liquid

It has the following contents:

YAML

After both the above files are synced you will then need to refresh Siteglide Admin and your WebApp will appear under WebApps in the sites left hand menu

Layouts

If you need layouts for your WebApp, these will be saved to:

marketplace_builder/views/partials/layouts/webapps/webapp_99/detail/default.liquid

marketplace_builder/views/partials/layouts/webapps/webapp_99/list/default.liquid

Both files contain the following layout by default: <p>{{this['name']}}</p>