We have the "force category theme option on, but we only seem to be able to have one instance of each theme. Would anyone know a safe workaround? FYI, we're running Moodle2.8.5+ (Build: 20150421)
Thanks in advance!
K.
We have the "force category theme option on, but we only seem to be able to have one instance of each theme. Would anyone know a safe workaround? FYI, we're running Moodle2.8.5+ (Build: 20150421)
Thanks in advance!
K.
Hi Richard,
Thanks for your reply. Do you know of a good tutorial on how to create a child theme in Moodle? I've found a few tutorials online, but I'm always a little weary. This one seems to be referenced a few times, but then the author says he's not a fan of Moodle: http://peter.upfold.org.uk/blog/2013/11/30/creating-a-custom-child-theme-in-moodle-2-6/ so I'm taking him with a grain of salt. Since you seem to know what your doing, can you confirm is this is the way to do it?
Kristina
Well, that video isn't quite accurate - Partly because some things have changed since 2.6 (needs a version.php) and some of it just isn't needed - you can lose a lot more out of the config.php, including the names of all the style sheets other than the one you need in your own child theme and you can also lose all the layout file array from there unless you are changing the layout files in your child theme (which if all you are changing is logos and colour schemes as per your original post, you don't need)
Although Peter says in that blog post 'I think it's actually an easier process than people think!' I actually think its even easier than he suggests
I've attached a very simple child theme for Clean, which should work. Of course, if you want to start adding changes to layout files, or adding your own theme settings page thats when things start to get a bit more complicated, but as a simple, 'change a few colours and logo' child theme, this should be a starting point.
You can add any css you want to the cleanchild.css file in the style folder - I've added a pix folder, which isn't strictly necessary in a child theme, but as you said you were looking at changing logos, then that would be the place to store them and reference them from your css as per https://docs.moodle.org/dev/Using_images_in_a_theme
Hope that helps
PS: the blue body background added in cleanchild.css is just to show its working and should be changed asap :D
Hi Richard,
I mean to write back earlier to say thanks. I had to shelve this project for a while, but I'm back at it now. I ended up just completely duplicating the clean theme instead of using a child theme, as after hours of trying, I couldn't get a logo to show up. All seems to be working well.
Thanks again for the help!
K.
Hi Kristina,
There is a tutorial for a specific theme which I have a copy on my GitHub
https://github.com/MaxThrax/moodle-theme_decaf_green/wiki/Inheriting-from-Decaf
which explains the principles behind the element within a child theme.
Cheers
Mary