
Learn to build a Moodle 4 child theme for PHP developers by overriding the Moodle Boost core theme, creating templates, renderers, configuration settings, and custom CSS.
Learn to set up a local Moodle 4.1 development environment, install a Ricochet boost child theme, and implement CSS overrides, renderers, and admin settings.
The complete plugin install file and code is included here for you to download.
The Child Theme can be installed using the standard Moodle plugin install process on Moodle 4.1.
Create the child theme’s config.php by adding the standard Moodle header, setting theme name Ricochet Boost, declaring the boost parent, enabling the editing switch, and configuring the render factory.
Override the navigation template by copying the boost nav bar mustache into your child theme, add a home icon in the user navigation, and test on staging.
Learn to create a settings page for a Moodle 4 child theme and manage login text via admin options, including a boolean toggle and extra text.
Modify the login layout to load admin-configured text into the login template. Use a mustache block to show or hide the login text based on settings in the template context.
Override the footer in a Moodle 4 child theme by using a boost theme footer template, adding a custom footer above the existing one via footer.mustache.
Explore how to override the course renderer in a Moodle 4 child theme to customize the available courses section, including displaying start and end dates.
Welcome to "How to Create a Child Theme for Moodle 4"!
In this course, you will embark on an exciting journey to learn the ins and outs of creating a child theme for the Moodle Learning Management System (LMS). Whether you are an experienced PHP developer or looking to enhance your coding skills, this course is designed to equip you with the knowledge and tools necessary to create your own customisable child theme for Moodle.
Throughout the course, we will focus on the fundamental coding structure required to build a theme, as well as delve into the intricacies of modifying templates, utilising renderers, and creating theme configuration settings. We will be building a child theme based on the popular Moodle Boost theme, incorporating the powerful Bootstrap framework.
To ensure a hands-on learning experience, you will have access to the completed code for the child theme. This will not only allow you to analyse and understand the child theme, but also provide you with the opportunity to modify and personalise it according to your preferences. Please note that this course assumes you have access to a development server with Moodle 4.x installed, enabling you to build and test your child theme in a practical environment.
By the end of this course, you will have acquired the skills to confidently create your own child themes for Moodle 4, offering a tailored and visually appealing experience for Moodle users. This course will empower you to customise Moodle to suit your specific needs.
I am thrilled to have you join me on this exciting journey of theme creation for Moodle 4. Let's get started and unlock the potential of a personalised Moodle experience together!