More theme: different background for courses possible?

More theme: different background for courses possible?

di Nick Varney -
Numero di risposte: 2

Hi,

I'm tweaking the More theme on a development 2.9.2 site and wondered if it was possible to set a separate background image for the home page to that of every other course on the site? This would allow me to have a background for the main page that is very distinctive, but set a more neutral background image for all the other courses. I appreciate the front page is a course itself so I suspect this isn't possible or easy but worth an ask.

Thanks.

Media dei voti: -
In riposta a Nick Varney

Re: More theme: different background for courses possible?

di Mary Evans -
Immagine Core developers Immagine Documentation writers Immagine Peer reviewers Immagine Plugin developers Immagine Testers

Hi,

This can be done, but it would mean you need to first make a child theme that inherits from the More theme but add a new setting to add a frontpage background image, which is quite laborious and mind boggling!

Alternatively a simpler method would be to add an alternative frontpage image directly to the More theme pix directory: For example:

moodle/theme/more/pix/fp-bgimage.jpg

and add this to your More settings Custom CSS area on that settings page...

#page-site-index {
    background-image: url([[pix:theme|fp-bgimage]]);
    background-repeat: no-repeat;
    background-position: left top;
}

Which should work.

Hope this helps?

Mary