Picture of Hyderabad Sunrisers
Basic triggered component How-To
by Hyderabad Sunrisers - Sunday, 8 June 2014, 2:24 AM
 

Hi,

I am trying to set up a basic triggered component with a button that displays text when clicked. Similar or the same to the one on the Adapt Demo course.

I'm a bit stuck, this is what I have:

 


{
"_id":"c-20",
"_parentId":"b-20",
"_type":"component",
"_component":"triggered",
"_classes":"",
"_layout":"full",
"title":"Welcome",
"displayTitle":"Welcome to this section.",
"body":"Some text here.",
"_pageLevelProgress": {
"_isEnabled": true
},
"triggered": {
"top": 30,
"left": 30,
"showButtonText": "Click me to show",
"hideButtonText": "Click me to hide"
}
}

 

I am able to build the course with grunt but the page which holds the component does not load.

Is there perhaps any documentation for creating a triggered component?

Thanks!

Picture of Daryl Hedley
Re: Basic triggered component How-To
by Daryl Hedley - Monday, 9 June 2014, 9:17 AM
 

Hey,

It looks as though you're trying to create a triggered type of component. Triggered works by making an already existing component (hotGraphic, text, media) into a triggered component. The '_type' attribute should remain the component you want and by adding the '_triggered' JSON data to that component will make it triggered.

I would also suggest getting the latest version of triggered with the updated JSON attributes.

Thanks,

Daryl