Themes

More theme: different background for courses possible?

 
Picture of Nick Varney
More theme: different background for courses possible?
 

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.

 
Average of ratings: -
It's only an avatar...
Re: More theme: different background for courses possible?
Core developersDocumentation writersParticularly helpful MoodlersPlugin developersTesters

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

 
Average of ratings: Useful (3)
Picture of Nick Varney
Re: More theme: different background for courses possible?
 

Brilliant, thanks Mary. Worked like a charm.

 
Average of ratings: -