Category: "Moodle"
Cloning Moodle Themes
Sometimes when managing Moodle we need to clone one theme to apply to a category or course, this would allow to personalize that cool theme. The original article in Moodle can be found here. But I'm even lazier than that. My approach is simple.
- 1. Create a copy of your theme (<theme>) folder, and rename it <new_theme>. Keep it in lower cases.
- 2. Open Eclipse PDT IDE
- 3. Open your theme using the Eclipse Menu : "File->Open Project from File System... "
- 4. Click on the "Directory" button and select your <new_theme> folder
- 5. Once it reads your folder click on the "Finish" button
- 6. Now go to "Search->Search"
- 7. In the containing text field type "<old_theme>"
- 8. Then click in "Replace" button. It would find all occurrences
- 9. Then typo <new_theme> in the "With:" field
- 10. Click "Ok"
You have changed all strings, now we need to change files' names.
- 1. Open the search function "Search->File.."
- 2. Leave containing text field empty
- 3. The file pattern will be *<old_theme>* (Including the "*")
- 4. The list will be available in your Search results window
- 5. Right click in each one and "Show In -> Project Explorer"
- 6. In the project explorer Right Click "Rename" or "F2" and replace <old_theme> for <new_theme> in the file name
- 7. Renamed files will disappear from your list, then once you have no more results, you are done.
Now copy your <new_theme> folder into your "<moodle>/theme " folder
Run Moodle and follow administration/update instructions
You need to remember that if you are using a 3rd Party theme, once it updates, or you update your Moodle, you may need to go over this process again. Use it responsibly.