Creating or removing Interactions can now be done outside the CMS via the BMP CLI.
Create interaction
Code Block |
---|
|
blinkm bmp create interaction <name> --type<type> --remote |
Using the create interaction function will create a local version of the interaction on your computer.
Parameter | | Description | Options |
---|
name | | The name of the interaction | |
type | The interaction type | "madl" (default), or "message" |
--remote | | Will create the interaction locally and on the BMP as a place holder | |
Info |
---|
title | Cteate Create Interaction |
---|
|
Created Interactions will not appear on the BMP until deployed, Except except for --remote which will add a place holder on the BMP |
Create interaction Examples
Here is an example of the BMP CLI workflow on a sample answerSpace called "myanswerSpace"
Image Added
First we will pull the empty answerSpace down from the BMP.
Code Block |
---|
|
blinkm bmp pull |
Image Added
Here is the view from the BMP CMS, no interactions are yet created.
Image Added
Now we are ready to start creating interactions.
Code Block |
---|
|
blinkm bmp create interaction default |
Once the interaction has been created you will notice the newly created files in your local project.
Image Added
Info |
---|
As the interaction type was left blank, the interaction "default" was create as a madl type |
Lets now create a "message" interaction using the – type option
Code Block |
---|
|
blinkm bmp create interaction message --type message |
Image Added
Now lets create an interaction using the --remote option
Code Block |
---|
|
blinkm bmp create interaction myinteraction --remote |
Once the interaction has been created you will notice the newly created files in your local project.
The following will Image Added
Info |
---|
|
Note because we used --remote an empty interaction place holder now shows in the BMP CMS. This method is ideal when wanting to reserve a unique name when developers are using both CMS and CLI at the same time. |
Image Added
Lets now deploy the interactions to the BMP
Code Block |
---|
|
blinkm bmp deploy |
Image Added
Editing interaction files
In every interaction directory is a file called <interaction name>.json
This file contains most of your interactions settings.
Code Block |
---|
language | js |
---|
theme | RDark |
---|
title | The example "default.json" code |
---|
collapse | true |
---|
|
{
"allow_mobi": "yes",
"config": {
"all": {
"type": "madl code"
},
"default": {
"display": "hide",
"displayName": "default",
"madl": {
"$file": "default.madl.php"
}
}
},
"id": "100654",
"name": "default",
"registered_only": "allow all",
"restricted": "no",
"status": "active",
"tags": null
} |
Many items within this file can be modified to change the interactions behaviour.
Below is a list of items you can modify safely.
Item | Description | CMS Label | Options |
---|
display | Hidden items are not displayed in lists but are otherwise still accessible | Display | hide / show |
displayName | Caption or title to display to users | Display Name | |
status | Inactive items are hidden and treated as though they do not exist | Status | active / inactive |