Reputation: 718
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?
Upvotes: 0
Views: 188
Reputation:
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! :)
Upvotes: 0
Reputation: 3
You need to create the Layouts of your theme.
From Moodle documentation:
"All themes are required to define the layouts they wish to be responsible for as well as create; however, many layout files are required by those layouts. If the theme is overriding another theme then it is a case of deciding which layouts this new theme should override. If the theme is a completely fresh start then you will need to define a layout for each of the different possibilities."
So, you need to create the layout
directory and create the PHP files inside with the layout settings of your theme.
Upvotes: 0