Note: This plugin is designed for use via composer in Totara 20+ only. See other branches for older versions of Totara and other installation methods.
This repository contains an example theme for illustrative purposes only. It should not be installed and used, but referenced and copied in creating your own theme.
The example implements both the /server/theme/ and /client/component/
portions of the custom Theme. The /client/component/ portion includes examples
of Tui (Vue) component overrides at a page and smaller component level, as well as CSS
variable and SCSS overrides and extensions. The /server/theme/ portion
includes the PHP config and an example of Mustache template overriding used
throughout Totara Suite.
The /server/theme/ portion is licensed under GPLv3, while the
/client/component/ portion has a proprietary license - please see relevant
file headers for detail.
To install via composer on a Totara 20+ codebase, you would run the command:
composer require totara/theme-exampleHowever, this plugin is designed for illustrative purposes and should not be installed and used, but referenced and copied in creating your own theme.
To do that you would:
- Create a new repository based on this one
- Rename all references of
exampletoyourthemenamein directory names, file names and file contents, for example method and variable names. - Update the
composer.jsonfile to reflect your partner and theme name and provide other details. - Publish the plugin to the plugin marketplace or other packagist-compatible repository.
composer requireyour new plugin in your Totara codebase.
Documentation is available on the Totara public developer documentation website, covering architectural goals, technology stack and more detail on custom themes. Improvements and feedback are welcome, both for this example and the public developer documentation, please submit your feedback to the Totara Support team.