Forums | Mahara Themes
Getting Started with Themes
02 August 2009, 7:14 PM
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
03 August 2009, 5:02 PM
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
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!
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?
17 October 2009, 12:49 PMThankyou for that. theme manipulation works perfectly.