Duplicate Moove theme

Duplicate Moove theme

by Big Picture -
Number of replies: 9

Hi All,

I'm having some difficulty duplicating the Moove theme. The reason why I'm doing this is I'm trying to assign different colour themes to specifics roles. So one role theme would be blue and another would be red.

What I'm done so far is simply duplicate the theme and changed all the naming of Moove to a random name. However, once I upload the theme the site is just showing a white page.

Is this normal? When I delete the uploaded theme the site goes back to normal. So I assume its due to something conflicting with the original theme.

Does anyone know a better method of duplicating a theme?

Any help would be appreciated.

Thanks,
Seb

Average of ratings: -
In reply to Big Picture

Re: Duplicate Moove theme

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok,

What version of Moodle / Moove theme please?

Getting a white page after a clone is not normal.  It indicates that you have made a mistake.

Some themes support child themes for setting override of given settings or allowing different custom CSS to be used, this could be an alternative method.  I don't know if the Moove theme supports child themes in this way.  Or you might be able to just create a child theme with overriding CSS that has Moove as the parent.

G

In reply to Gareth J Barnard

Re: Duplicate Moove theme

by Big Picture -

Hi Gareth,

Moodle version is 3.6.3 (Build: 20190413)
Moove Theme Version 3.6.4 (2019022800)

I'm not sure what I've done wrong as I followed this tutorial - https://docs.moodle.org/dev/Cloning_a_theme

Maybe Moove doesn't support cloning as you mentioned. However, do you think there's another method to get this working?

Thanks,
Seb

In reply to Big Picture

Re: Duplicate Moove theme

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Seb,

By the very nature of renaming with open source, all themes will support cloning.  If it breaks with a white screen then you've done something wrong and look in the PHP log file.  I don't think there is another method bar standard debugging to find and fix the fault.

The tutorial you linked does state at the top "Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable." - therefore an indicator as to why your cloned theme does not work because the instructions are no longer appropriate.

G

In reply to Gareth J Barnard

Re: Duplicate Moove theme

by Big Picture -

Hi Gareth,

Thanks for the help.

Since the tutorial is out of date do you have an alternative method of doing this?

Thanks,
Seb

In reply to Big Picture

Re: Duplicate Moove theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

As Gareth says, the method is correct (the details in that page will be out of date though), but you will have an error somewhere.

How did you change the theme name? Did you use a search and replace tool (in an editor/command line), or do it manually? There are often file names which need to be changed too which don't get found by an editor search and replace, but which won't be on a generic set of instructions either.

Do you have debugging turned on? if so, you may be able to track down the error(s) and rename them correctly.

Richard

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: Duplicate Moove theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

PS - as Moove has Boost as its parent, you should take a look at the link from the page you were already using around creating a theme based on Boost. It may give some hints as to where to look for any errors in what you have done so far.

https://docs.moodle.org/dev/Creating_a_theme_based_on_boost

I realise you are cloning, not creating, but there is some useful information there around how boost based themes are structured.

Average of ratings: Useful (2)
In reply to Gareth J Barnard

Re: Duplicate Moove theme

by Big Picture -

Hi Gareth,

If you don't know another method of doing this may be an alternative solution is possible?

Is it possible to change the header colour of Moove for different roles/categories?

Thanks,
Seb


In reply to Big Picture

Re: Duplicate Moove theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Roles - no, not that I can think of, particularly as a user may have multiple roles on any given page, although you may be able to customise the theme with some if statements to detect the particular roles you want to target (although ideally this should be done in a clone/child anyway, bringing you back to the initial issue)

Categories - yes. The body classes should contain a categoryid class which can be used to target specific CSS at any given category.

Hope that helps

Richard

Average of ratings: Useful (1)
In reply to Big Picture

Re: Duplicate Moove theme

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi, 

Just following this discussion thread and I would agree with Richard’s choice of the tutorial link he added to his last comment.

The thing about Themes is that there are lots of things you can do and some of this is just alter the parts you need to use in order to do what you are asking to do.

In a former life when I was new to Moodle Themes I discovered that you can make some very basic child themes which are very simple in structure as they only carry with them the basics and leave the main structure with the parent theme.

So what I am trying to say is that all you would need is a style sheet for the main colour you want for each theme.

so...

Parent theme name = moove

Child Theme Names = moove_red, moove_blue, moove_green, moove_yellow, etc.,

where these child themes would only need the basics...

For example:

theme_moove_red

config.php

style/moove_red.css 

lang/theme_moove_red.php

version.php

In other words just a minimalist theme which is easy to maintain.

That said it is time consuming and not as easy as I have made it sound, but it is easier as you do not need to clone the parent theme totally, which is a mammoth task.

Hope this helps?

Mary

Average of ratings: Useful (1)