I need to create a list of elements in a Moodle 2.x theme setting for which I will enable drag and drop re-ordering using Moodle’s included YUI. My problem is that I don’t know how to add my custom HTML/JS with a custom theme setting. I can only find documentation about adding settings with the pre-defined functions offered by Moodle, like admin_setting_configtext or admin_setting_configselect or admin_setting_configtextarea etc… How do I go about creating my own markup and use my own javascript in a theme setting page?
Thanks!
I need to create a list of elements in a Moodle 2.x theme setting
Share
You can create a custom page using Moodle, remember to require the config and set up the page:
From this page you can define whatever setup or configuration you want. Finally you will want to add this page to the site admin navigation. Make sure you have a settings.php in the root directory of your theme and within that file you’ll be wanting something like this:
Themes being the reference for the “themes” admin menu I figure you probably want to add this to. Remember that you should be using get_string in the above examples instead of hard-coding strings.