Content / Theme basics / Theme folder


Theme folder

Folder "e107_themes/your_theme"

comments: 0

Folder structure:


Required files: theme.xml, theme.php, style.css.
All other subfolders and files are optional.
Advanced files: theme_library.php

File "theme.php"

The theme.php file contains the code for the layout of your theme. (required)

File "style.css"

style.css file contains the CSS styling that changes the design of your layout. (required)

File "style_custom.css"

Special file with CSS styling loaded after style.css by default. You should put all your changes in css to this file not to be overridden with next theme update. (optional)

Subfolder "images"

The images folder is for all images used in/by theme. (as by design). (optional)

Subfolder "templates"

If you need to change html markup of core templates, you put them to this folder.

All templates used by e107 can be overriden. If you override core templates (located in e107_core/templates folder) just copy them to your_ theme_name/templates. If you override plugin templates, put them inside a created (in your_theme) subfolder with plugin name.

Be aware that some older plugin can look at different place(-s) for template, in this case just check the code of plugin.

Examples: e107_core/navigation_template.php -> e107_themes/yourtheme/navigation_template.php (straight into templates folder...not into a subfolder)

e107_plugins/news/templates/news_template.php -> e107_themes/yourtheme/templates/news/news_template.php (into a subfolder)

To use exact plugin name for subfolder is important!

Subfolder "languages"
The languages folder is for any text that is coded in the theme allowing translations of your theme to be made by other 3rd parties without too much hassle. If you make multilanguage site and your theme uses language strings, you put them to this folder in file with lang name f.e. English.php


And you use it in theme this way:


Admin part is needed in theme_config.php file this way:

e107::lan('theme', 'admin',true);

(note : difference is English = frontend display; English_admin = admin area)

Remember : each file starts with a Capital !!!. eg. English.php

Subfolder "install"

You can put here demo data in xml format for your theme including demo images. (optional)

File "index.html"

Just an (empty) file to be sure that your directory will be not listed aka Silence is charm. (optional)