Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:45:42+00:00 2026-06-14T13:45:42+00:00

I need to create a list of elements in a Moodle 2.x theme setting

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:45:44+00:00Added an answer on June 14, 2026 at 1:45 pm

    You can create a custom page using Moodle, remember to require the config and set up the page:

    require('../../../config.php');
    require_once($CFG->libdir.'/adminlib.php');
    //page definition
    $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
    $PAGE->set_url('/theme/your_theme/admin/manage.php');
    $PAGE->set_pagetype('theme_name_manage');
    $PAGE->set_title('Manage your theme');
    $PAGE->set_heading('Manage your theme');
    echo $OUTPUT->header();
    //Page content
    echo $OUTPUT->footer();
    

    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:

    if ($hassiteconfig) { // needs this condition or there is error on login page
        $ADMIN->add('themes', new admin_externalpage('theme_name', 
            'Manage Theme XYZ', 
            $CFG->wwwroot."/theme/name/admin/manage.php", 
            'moodle/site:config'));
    }
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create an ordering list having as elements strings and images (some
I have the following code. I need to create list separators before A elements,
I need to create one drop down list contains some Languages. By selecting any
I need to create a drop down list (spinner) in eclipse for Android whereby
I need to create a list of elements. The elements in the list are
I need to create a list in c# with click-able and customizable child elements.
I need to create a list in a grid style, so there will be
I need to create Spinner for list of colors. I will take selected item,
Given a list of e.g. two elements l = [1,0] I need to create
i need create an email list sending to many emails. what is best solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.