Please note: This page is under construction and has not been finished yet.
Introduction
TODO:
overview of install & config files (theme.xml & theme_config.php)
highlight some options
refer to example themes (bootstrap3)
theme.xml
This file contains information about the theme. and is used during installation and also during configuration of the theme.
Please note: Unlike plugin.xml, the theme.xml file is not intended to replace the theme.php file. Instead, theme.xml works alongside theme.php to provide (meta)data about the theme itself.
Example#1: Full theme.xml
The below example uses the theme.xml from the Bootstrap3 theme included in e107 by default. Each section of the XML file is elaborated upon below.
Each theme can contain various layouts. Additionally, each layout can be used for specific custom pages and each layout can have specific menu presets.
Layout
<layout name='modern_business_home' title='Modern Business: Home page carousel with fixed custom-menus' />
Adding $CUSTOMPAGES to theme.php in e107 v2.x is deprecated and should be avoided!
Menu Presets
Theme authors can create buttons for menus that can be activated by the user from "Menu Manager" or "Theme Manager". These are placed between and and should be enclosed in the and tags with the opening area tag naming the menu area it corresponds to; the example below would be for a layout with two (2) menu areas ({MENU=1} = and {MENU=2} = ). The tag "menu name" must contain the name of a valid and installed menu.
TIP: To create a new theme.xml file or derive one from an existing v1.x theme.php file use the conversion tool in the Admin Area > Theme Manager > Tools
(/e107_admin/theme.php?mode=convert)
Attribute
Description
Example
Mandatory?
Tip: If you are developing a commercial theme, you'll want to add a few extra attributes so that it displays correctly in the admin area under "Find Themes".
Just package the theme's zip file with only the theme.xml and any images (including screenshots), excluding .php, .css files etc. before sharing it in the developers area on e107.org.
When the user clicks to download the theme, it will display the URL you have provided.
Note the / to close the tag at the end.
Attribute
Description
Example
Mandatory?
In this section, theme designers can include plugins that they intend to be used with the theme. In the "Theme Manager" > Site Theme > "Suggested Plugin" section with buttons for those plugins that the user can click on to install them.
Attribute
Description
Example
Mandatory?
The keywords associated with the theme. They are used when searching for plugins either through the Admin Area or on https://www.e107.org/themes.
Each theme can contain one or more screenshots. These screenshots are displayed in the Admin Area and on https://www.e107.org/themes.
Attribute
Description
Example
Mandatory?
Each layout can assign specific pages which then, by default, make use of this specific layout. The user can modify the pages used by each layout in the "Theme Manager" > Site Theme > > Layouts section
You can use the constant FRONTPAGE to refer to the currently set frontpage setting.
If you want users to b e able to set specific theme preferences, use the theme_config.php file.
TIP: To insert more favicons, you can use the Meta Tags
👍
👍
👉
👍
name
The author's name, e107 user name or nickname.
e107 Inc.
Yes
email
E-mail address. Useful to get feedback and bug reports on the theme. A mailto link to it is displayed on the Admin Area > Theme Manager page.
e107inc@something.com
Yes
url
A link to the author's website. A link to it is displayed on the Admin Area > Theme Manager page.
https://www.e107.org
Yes
description
A brief description of your theme. Displayed on the Admin Area > Theme Manager page.
Example description of your choice.
No
👉
name
Refers to the plugin folder name of the recommended plugin.
featurebox
Yes
url
For plugins that are included in e107 by default, use "core".
For third-party plugins ....
core
Yes
👉
👉
Attribute
Description
Example
Mandatory?
name
Name of the library
bootstrap.editable
Yes
version
Version of the library.
(semantic versioning)
3
No
scope
The area in which the library is included.
Possible values:
front
admin
wysiwyg
Can be multiple if separated by comma
admin
Yes
Attribute
Description
Example
Mandatory?
file
css/modern-light.css
Yes
name
Modern Light
Yes
description
A high-contrast light skin
No
thumbnail
images/admin_modern-light.webp
No
scope
admin
Yes
exclude
bootstrap
No
name
Shortname of the layout
(use underscores)
jumbotron_home
Yes
title
Descriptive title of the layout
Home page carousel with fixed custom-menus
Yes
default
Indicates whether a layout is the default layout to be used. There can only be one default layout.