Forums | Mahara Community

Support /
customize css


Conrad Lienhardt's profile picture
Posts: 127

12 April 2017, 6:02

Hello Mahara Community, 

I want to customize my template by custom.css. To use custom.css I do have to set a link in the header of the template(s). In my institution I have choosen "Configurable Theme".  So I presume it is in a way bootstrap orientated.   Where can I add links and meta tags? (out of compressed css files)?

Thanks in advance, Conrad

 

Robert Lyon's profile picture
Posts: 758

12 April 2017, 8:44

Hi Conrad

The configurable theme allows some set customizations through the administration backend but if you want more flexibility over css you can add a file to this place:

htdocs/local/theme/style/style.css

And add custom css there. This file will be called last in the hierarchy of the css files so can override existing theme css values.

The good thing about adding custom css to that file is it won't be overwritten on upgrading.

There is also the ability to add code to the pages via these config options:

/**
 * @global string $cfg->additionalhtmlhead Added as the last item before the closing </head> tag
 */
$cfg->additionalhtmlhead = '';
/**
 * @global string $cfg->additionalhtmltopofbody Added immediately after the opening <body> tag
 */
$cfg->additionalhtmltopofbody = '';
/**
 * @global string $cfg->additionalhtmlfooter Added as the last item before the closing </body> tag
 */
$cfg->additionalhtmlfooter = '';

Just add the ones you need to use to your htdocs/config.php file. The $cfg->additionalhtmlfooter is usually used for things like google analytics

Is that what you are needing?

Cheers

Robert

Conrad Lienhardt's profile picture
Posts: 127

12 April 2017, 21:18

Hi Robert,

thanks for the tipping support and solution. This works pretty fine. Great!

Regards, Conrad

3 results