Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Building your own SBT Moodle block widget

Benjamin Jakobus edited this page Apr 9, 2014 · 1 revision

Building an IBM Connections widget for Moodle is similar to building a SBT WordPress widget, but simpler. Widgets are placed in /user_widgets:

user_widgets/my-widget.php will hold your JavaScript (see existing samples). user_widgets/templates/my-widget-template.php will contain your HTML template. It is important that you specify the container that will hold the output of your JavaScript. The container is specified inside your /user_widgets/my-widget.php file. Simply paste the following into the top of your file (yup, that's the important part!):

<div id="<?php echo $this->config->elementID;?>"></div>

We've shipped several sample widgets for illustration purposes.