Forums | Mahara Themes

General discussion /
Getting Started with Themes

Mike Smith's profile picture
Posts: 2

02 August 2009, 7:14 PM

Hi All,

I'm new to Mahara and have successfully installed 1.1.5 and wish to make some minor changes to the theme (the logo to start with).  I've seen reference to Smarty but that is completely new to me.  At this stage I just want to know how to copy and modify the default template.  However I can't even find the administrator setting for selecting a theme. Could someone give some basic help here?

Thanks in advance,  Mike Smith - Brisbane

Nigel's profile picture
Posts: 1643

03 August 2009, 5:02 PM

Hi Mike,

Our theme documentation is criminally lacking. I plan to fix this asap, in the meantime here are the steps for creating a new theme:

Create a new directory in the theme/ subdirectory (e.g. theme/ponies/ or similar)

Copy the config.php from the default theme directory to your new directory

Edit your config.php, remove the $theme->formrenderer line, and add a new line: $theme->parent = 'default';

From then on, you will have created a new theme that inherits from the default theme. What this means is, when Mahara needs a theme file (image, CSS file or template), it will look for it in your theme's directory, and if it can't find it there it will use the one in default/.

This means you can create e.g. the static/images directory, and put a logo.gif in it, and this will change the site logo Wink

You can do the same with static/style/*.css - those stylesheets will be included on the page after the parent theme's ones, so you just need to override rules you want to change. Unfortunately the default css has quite a bit of !important in it (all removed in 1.2), which will make the process a bit more annoying than it has to be.

Hope that's enough to get you started! 

Dave Emsley's profile picture
Posts: 23

17 October 2009, 10:36 AM

Hi - New to Mahara and I'm looking to theme it.  I have created the folder MyMaharaTheme with an edited version of the config.php file in it as described below but it is not vision in the Site Admin section; all I get is default and no way to change it.

Is there something I have missed?  or neglected to do? 

fiaraz iqbal's profile picture
Posts: 3

17 October 2009, 12:49 PM

Thankyou for that.  theme manipulation works perfectly.
Nigel's profile picture
Posts: 1643

20 October 2009, 9:54 PM

Hi - what version of Mahara were you trying this on? It should work fine for Mahara 1.1.X, though 1.2 has different instructions.

We put some better instructions on the wiki:

5 results