Views/Creating a new site theme

When creating a new site theme you should first know how the folders and files in Elgg are connected. A simple way of showing this is the following nested list (all situated in /mod/yourtheme/views/default/):

  • mod/yourtheme/views/default/
    • pageshells/pageshell.php
      • page_elements/header.php - head element, meta information
      • page_elements/elgg_topbar.php - main navigation, search
        • navigation/topbar_tools.php - tools dropdown menu
        • elgg_topbar/extend.php - optional file to extend the topbar with more items
      • page_elements/header_contents.php - start of wrappers, logo
      • messages/list.php - system wide messages
      • spotlight/default.php - "spotlight" with static content
      • page_elements/footer.php - legal text, links

As you can see, it's easy to change the ordering of e.g. the topbar and header_contents or to remove the spotlight completely.

Overriding CSS

To override the style sheets for, say, the Blog section, just create a folder in your theme folder called "blog", the same name as the regular blog folder (in /views/default/ that is). Then copy the css.php file from the standard blog folder here and start modifying.

The same goes with every other plugin - you can have your theme override CSS information for other plugin views as you see fit.

Overriding actions

How is this done?

Search docs