Skip to main content

About Child Items

Some Screens and Menus rely on a list of things. Example: A Location Map relies on a list of locations to show on the map and an Image Gallery relies on a list of images. These lists of items are called Child Items.

There are two ways to setup the list of items. The items can be setup in the parent screen's JSON data (the childItems array) or the items can come from a remote server. Downloading the list from a remote server allows the items to be modified and updated dynamically.

If the screen uses a dataURL in it's JSON configuration, the app will download the list of child items from the internet at the provided URL.

If the screen does not use a dataURL, the app will look for the list of child items in the screen's JSON configuration data.

Example

A list of questions setup in a Quiz screen. This Quiz screen does not use a dataURL and the questions are provided directly in the childItems[] array.


{
"itemId": "99999",
"itemType": "BT_screen_quiz",
"itemNickname": "Fun Quiz",
"navBarTitleText": "My 2 Question Quiz",
"childItems": [{
"itemId": "question1",
"itemType": "BT_questionItem",
"questionText": "What is the capital city of Nevada?",
"correctAnswerText": "Carson City",
"incorrectText1": "Las Vegas",
"incorrectText2": "Reno",
"incorrectText3": "Tahoe"
},
{
"itemId": "question2",
"itemType": "BT_questionItem",
"questionText": "What is the capital city of California?",
},
"correctAnswerText": "Sacramento",
"incorrectText1": "Monterey",
"incorrectText2": "Los Angeles",
"incorrectText3": "San Diego"
}]
}

Example Quiz screen without a childItems[] array in it's JSON data. The questions are downloaded from the dataURL. Click the dataURL to see how the child items are output.


{
"itemId": "99999",
"itemType": "BT_screen_quiz",
"itemNickname": "Fun Quiz",
"navBarTitleText": "My 2 Question Quiz",
"dataURL": "http://www.buzztouch.com/appdata/sample-questions.txt"
}