I am developing a fresh parent theme in moodle. My moodle build version is 20231211. I have created a barebone structure of all necessary files and it looks like below:
oneui
├── README.md
├── classes
│ └── output
│ └── renderer.php
├── config.php
├── image.png
├── lang
│ └── en
│ └── theme_oneui.php
├── pix
│ ├── favicon.ico
│ └── screenshot.png
├── screenshots
│ ├── config.png
│ ├── folder.png
│ ├── lang.png
│ ├── output1.png
│ ├── output2.png
│ ├── output3.png
│ └── version.png
├── settings.php
├── styles
│ └── styles.css
├── theme_oneui.php
└── version.php
Source code for the same can be found in https://github.com/SRRInternational/moodle-parent-theme.git
There are no errors after adding the theme in moodle theme folder.
Issue:
My newly created theme, isn’t listed in Appearance -> Theme Selector view. Please advice where I can look and what could be causing this issue?
2
Answers
You need to create the Layouts of your theme.
From Moodle documentation:
So, you need to create the
layout
directory and create the PHP files inside with the layout settings of your theme.This is a the documentation on themes and layouts in moodle: https://docs.moodle.org/dev/Themes_overview I did a quick search and quickly realized you need to create a layout for your theme.
Hope this helps! 🙂