Hi there
I am having a go at developing a custom component and as recommended on the forum, I have taken an existing component (mcq) to use as a starting point.
I have a basic understanding of Backbone/Underscore/Handlebars so kind of hope to improve on this as I proceed.
I want to try and get a better understanding of some of the basic elements as follows:
The mcq has a less file with a filename "mcq.less" in a "less" folder.
Can I confirm the less file needs to be in a folder titled "less" and that the less file needs to have the same prefix as the "component" property in the bower.json file?
Similarly, the mcq has a handlebars file with a filename "mcq.hbs" in a "templates" folder.
Can I confirm the handlebars file needs to be in a folder titled "templates" and that the handlebars file need to have the same prefix as the "component" property in the bower.json file?
Essentially it would appear Adapt automatically picks up on the less and hbs files if they are in the correct folders and have the correct filenames. I have seen some components that have more than one file in the less and templates folders - I am assuming in this scenario, there needs to be a reference to these additional .less and .hbs files somewhere?
Can you explain what the following element is in the handlebars file?
{{> component this}}
I have seen the following wiki page but it didn't make it clear what this element does.
https://github.com/adaptlearning/adapt_framework/wiki/Developing-plugins
If there is any additional info on developing plugins that you can point me to it would be really appreciated.
Thanks
Paul