Chamilo
Search…
Theming through templates
Chamilo, since version 1.10, uses the Twig templating engine for most (and in the future all) of its interface.
To update the template in Chamilo, you can one of two things: redefine some template files in main/template/override/ OR copy the default folder and modify a line in app/config/configuration.php, following this procedure :
1
cd main/template/
2
cp -r default newtemplate
3
cd newtemplate
4
// edit the new template to your heart's contempt
5
vim ../../app/config/configuration.php
6
// Find the $_configuration['default_template'] setting and replace
7
// 'default' by 'newtemplate', then uncomment it (remove the // prefix)
8
// Finally, refresh the archives (find the « Archive cleanup » option on
9
// the admin page
Copied!
This way, you can edit anything in your new template, while keeping the original template available, and you also avoid your template being overwritten during your next Chamilo upgrade.
However, it is important to understand that any custom template will have to be maintained: if a new .tpl file is created in the default/ template in Chamilo, then this new .tpl file will have to be added to your custom template. In the case of the override/ folder, although it is not necessary to create the corresponding file, it is still necessary to make sure that no new information added to the default/ .tpl file that would otherwise not appear in the override. These changes can be tracked through the history of changes in the default/ directory on Github: https://github.com/chamilo/chamilo-lms/commits/1.11.x/main/template/default
Inside the default directory, you'll find the following directories, which we explain when needed (most of them are self-explanatory).
    admin
    agenda
    auth → all stuff related to authentication forms and processes
    course_description
    create_course
    export
    form
    glossary
    index → homepage for anonymous users and announcements
    layout → header, footer, banner and more are stored here
    learnpath
    link
    mail_editor
    notebook
    pages
    social
    skill
    userportal → list courses in « My courses » tab
    work
Last modified 1yr ago
Export as PDF
Copy link