MATE Theme for Contao
Quick start
The theme documentation covers these topics:
Quick start
The theme documentation covers these topics:
The theme can only be installed into an empty Contao installation and is compatible with Contao 4.4 or higher.
Version 3.0.0 of the MATE theme requires at least Contao 5.0.0 and PHP 8.0.
We recommend Contao 5.3 with PHP version 8.3 or higher to achieve the best possible loading time with our theme!
The MATE theme is easy to install with the Contao Manager. You find a step-by-step installation guide here: MATE theme installation.
The MATE theme is available for free (with copyright notice) or with a paid license (without copyright notice). You find the detailed license terms of the MATE theme here.
You can buy the paid license at contao-themes.net. Select the option without copyright notice, enter your domain and then click the button Add to cart. Then go to checkout and follow the next steps.
After successful payment you receive an email with the theme license, an invoice and further details.
Until then you can already install and use the theme with the copyright notice.
As the holder of a paid license you get premium support if you have problems installing or setting up the theme.
If you ordered the theme license via themes.contao.org, please send us an email with your domain and the ordered theme to support[AT]pdir.dev, so that we can activate the theme domain in the back end.
If you bought a license and have already installed the theme, you can register it in the back end under the menu item Themes. Click Activate theme domain, enter your domain and then click Check Domain. If the domain was registered successfully, you see the message Domain registered. When you reload the page, it should look like the following screenshot.
If you only see the message “You can set a Theme Licence in Layout -> Themes.” when you click the button Activate theme domain, you have to edit the theme and enter mate in the field Theme Code (see the following screenshot). The input field for the domain should then be visible.
Once you have bought a license, you can remove the copyright notice, which is placed in an article, in the Contao back end.
Go to the article view, look for the article 05/05 footer bottom under MATE Elements - 05 Footer and edit it via the pencil icon. It contains a text element that you can edit.
Still using Contao 4? You find the installation guide here.
The demo can only be imported into an empty Contao installation.
If you have already created content on your site, see the following guide: Installation into an existing Contao installation.
Open the Contao Manager: www.your-domain.com/contao-manager.phar.php. In the Discover tab, enter MATE Theme and click Add.
In the Packages tab you should now see a new package to be installed. Click the button
Apply changes at the bottom to start the installation.
Once the installation is finished, click Update database.
Run all database migrations and click Continue. The first step creates all folders and files in
the file manager.
Then the missing fields are created in the database.
In the last step the demo data is imported.
Done! When you open your site, you should already see the demo.
Error: This page isn’t working / The page redirected you too many times
Edit the website root and set the protocol under URL settings to http:// or https://, depending on how your site should be accessed.
Error: imagick not installed
If the error imagick not installed occurs with PHP 8.0, you can solve it with an adjustment in config.yml
and clearing the cache afterwards. More information in the PDIR blog post (German)
The theme can only be installed into an empty Contao installation and is compatible with Contao 4.4 or higher.
The following steps are only necessary for the first installation, not for an update of the theme. To update the theme, simply use the Contao Manager. Then open the install tool and update the database. A database backup never hurts!
Follow these steps to install the MATE theme. At the end of the guide you also find a helpful video.
First open the Contao Manager at the following URL: www.your-domain.com/contao-manager.phar.php. Select Discover, enter mate theme in the search field and add the package MATE Theme.
Then switch to Packages, enter the version ^2.20 via the gear icon and start the installation of the theme with the button Apply changes. With the latest version the Contao Manager would otherwise install version 3.x, which is only compatible with Contao 5 and later.
Then open the install tool and update the database.
Log in to the back end with the user account you created and select the menu item Mate Theme Setup under MATE THEME in the left navigation. Then click the button Synchronize theme files (see image 2). This creates all files in the file manager under the folder mate and copies the SQL files for the database import into the templates folder.
Then empty the database table ’tl_files’ by clicking the button Empty table ’tl_files’. This step must be carried out before importing the database.
Emptying the tl_files table deletes the image references. This is only necessary for the first installation of the theme.
Image 2: Synchronizing the theme files
Now open the install tool. Under the tab Import a template (see the following screenshot) you can import an .sql file from the templates directory. Select the file for your Contao version and tick Do not truncate tables. Then click Import a template.
If you chose the minimal Contao installation in the Contao Manager (without news, calendar,
newsletter, comments, listing, FAQ), select the SQL file named minimal_installtool.sql.
If the database was imported successfully, you should get a message that a template was imported, as in the following screenshot.
Alternatively, you can import the sql file with phpMyAdmin.
Then switch back to the Contao back end, select the menu item System maintenance and recreate the symlinks by ticking Recreate the symlinks and then clicking the button Purge data.
In the Settings, activate Auto_item and Use folder URLs under Front end settings. As of Contao 4.7 the setting to activate auto_item no longer exists in the back end; it is always active by default. As of Contao 4.11 the option “Use folder URLs” is no longer in the settings but in the website root under URL settings.
Under Advanced CSS settings, select the class set materialize.json (see image 5).
Image 5: Advanced CSS settings
Error: This page isn’t working / The page redirected you too many times
Edit the website root and set the protocol under URL settings to http:// or https://, depending on how your site should be accessed.
Error: imagick not installed
If the error imagick not installed occurs with PHP 8.0, you can solve it with an adjustment in config.yml
and clearing the cache afterwards. More information in the PDIR blog post (German)
How to define colors, fonts and your own CSS is explained on the page Colors and fonts.
For your own JavaScript, it is best to create a separate file and include it in the theme.
Under MATE Elements you find articles that you can include anywhere on the website with an insert tag. In the back end, go to Articles and scroll all the way down.
In the article settings (wrench icon) you can select the matching Theme Helper Tag under Template settings (see image 2). If you use several website roots with the MATE theme in one Contao installation, you can also select the desired page under Page name.
You then include the article with an insert tag in an HTML element or a template, e.g.:
{{theme::content::MATE02/01}}The first number stands for the type (Header, Modules or Footer) and the second number for the Theme Helper Tag in the article.
How to create your own Theme Helper Tags is explained in the Theme Helper documentation.
Image 1: Articles under MATE Elements

Image 2: Selecting the Theme Helper Tag in the article

Image 3: Including the article via the Theme Helper Tag

You find the header content in the articles under MATE Elements – 01 Header. In the back end, open the menu item Articles and scroll all the way down.
You can replace the logo in the article 01/04 Logo. It contains two logos: the second logo appears when the navigation gets a green background while scrolling. This second logo must have the CSS class fixed-nav.
The footer content is in the articles under MATE Elements – 05 Footer. You find them in the back end under Articles (at the very bottom).
They are included – just like the newsletter box (see Theme elements) – via the module Footer.
Introductory Contao 4 tutorial
Basic settings in Contao
After installing the theme, you find the SCSS files in the file manager under the path mate/sass.
Depending on the installed theme version, there are two ways to make your own customizations:
Older theme versions: You use the files
custom.scss (for SCSS and CSS)_custom_colors.scss (to change the base colors and choose a color scheme)_custom_variables.scss (for more detailed adjustments such as fonts or colors of individual elements)To change a variable, remove the comment characters (slashes) in front of the line in the respective file.
Newer theme versions:
As of the latest version there are no SCSS variables anymore, only CSS variables.
In addition, _custom_colors.scss was merged into _custom_variables.scss – so you only find one file named
_custom_variables.scss. There you can adjust all color and other variables.
Here, too, you have to uncomment the lines to activate changes.
In both cases you can still add your own SCSS or CSS in custom.scss.
If the SCSS file was not edited with the Contao editor but uploaded with an FTP program, you have to purge the script cache under System maintenance in the Contao back end and, if necessary, reload the page with Ctrl + F5.
Do not rename the theme folder mate in the file manager, otherwise the SCSS files will no longer be loaded. You do not have to include the files in the page layout yourself, the theme already loads them automatically.
By default the MATE theme comes with a light layout and a green primary color. You can also choose other color schemes:
All of the color schemes above are adjusted for high contrast to ensure good readability and accessibility.
In addition there is a green, blue, yellow and dark color scheme that is not adjusted for high contrast. These come from an earlier theme version and are still included for backward compatibility.
To switch to a different color scheme, uncomment the corresponding line under Colour Schemes in _custom_variables.scss
(or _custom_colors.scss in the older theme version) by removing the slashes. You may need to reload the page with
Ctrl + F5 for the change to take effect.
@import 'mate_color_schemes/mate_green_colors_contrast';
//@import 'mate_color_schemes/mate_dark_colors_contrast';
//@import 'mate_color_schemes/mate_blue_colors_contrast';
//@import 'mate_color_schemes/mate_yellow_colors_contrast';
//@import 'mate_color_schemes/mate_red_colors_contrast';
//@import 'mate_color_schemes/mate_dark_colors';
//@import 'mate_color_schemes/mate_blue_colors';
//@import 'mate_color_schemes/mate_yellow_colors';If you want to use several color schemes on one website, follow this guide.
Important note
If you use the latest version of the MATE theme, you may wonder where _custom_colors.scss has gone.
Don’t worry: as of MATE version 3.5.0, a new installation of the MATE theme only has
_custom_variables.scss, which now contains all color and variable definitions.
What this means for you:
_custom_variables.scss with all color and variable settings. Use CSS variables for your customizations._custom_variables.scss and _custom_colors.scss remain.
Use SCSS variables for your customizations.ℹ️ How do I update my existing installation to the new version with CSS variables? As of version 3.5.0 the MATE theme was thoroughly adapted for accessibility. If you want to use all current and future features, you should switch to the new version. You find a detailed guide here: Update to CSS variables.
In our theme you can adjust many styles via CSS variables. They are already prepared in the stylesheet, but commented out by default (with //). To activate or override a variable, simply remove the // at the beginning of the line.
📁 Where to find the variables
You find the file for adjusting the variables in the file manager under mate/sass/_custom_variables.scss.
✅ Example: activating a variable
// Vorher (nicht aktiv):
//--mateColor2: #86af49;
// Nachher (aktiv):
--mateColor2: #86af49;🔧 The most important CSS variables
Here is an overview of the most important CSS variables that you can adjust in
mate/sass/_custom_variables.scss.
| Variable | Meaning |
|---|---|
--mateColor1 | Primary color, light shade |
--mateColor2 | Primary color |
--mateColor3 | Primary color, dark shade |
--mateColor4 | Secondary color |
--mateColor6 | Secondary color, light shade |
--mateColorWhite | White |
--mateColorBlack | Black |
--mateColorGreyLight | Light grey |
--mateColorGreyDark | Dark grey |
--pageBackground | Background color of the website |
--primary-text-color | Primary text color |
--secondary-text-color | Secondary text color |
--mateColor2-text-color | Text in the primary color – e.g. for links or headlines on a light background |
--mateColor3-text-color | Text in the dark shade of the primary color – e.g. for links or headlines on a light background |
--mateColor4-text-color | Text in the secondary color – e.g. for links or headlines on a light background |
--boxes-background | Background color of boxes (e.g. teaser, contact, news, event, form, breadcrumbs) |
--boxes-text-color | Text color in boxes (e.g. teaser, contact, news, event, form, breadcrumbs) |
--rgba-mateColor2 | Primary color as an rgb value |
--rgba-boxes-background | Box background as an rgb value |
Variables in _custom_colors.scss
$mateColor1: Primary color, light shade $mateColor2: Primary color $mateColor3: Primary color, dark shade $mateColor4: Secondary color $mateColor6: Secondary color, light shade
$mateColorWhite: White $mateColorBlack: Black $mateColorGreyLight: Light grey $mateColorGreyDark: Dark grey $pageBackground: Background color of the website
$primary-text-color: Primary text color $secondary-text-color: Secondary text color
$boxes-background: Background color of the boxes (e.g. content box, teaser box, news, events, login, newsletter, etc.) $boxes-text-color: Font color of the boxes (e.g. content box, teaser box, news, events, login, newsletter, etc.)
$contentbox-first-background: Background color of the first content box $contentbox-second-background: Background color of the second content box
If you want to use your own font, you can include it at the very top of
_custom_variables.scss.
🔗 Recommendation: fonts via Google Webfonts Helper
A great way to include a font quickly and easily is the site:
There you can:
/files/mate/fonts/.📄 Example: adding the CSS to _custom_variables.scss Copy the generated CSS code from the website (e.g. for the font “Ubuntu”) and paste it at the very top of _custom_variables.scss:
/* ubuntu-regular - latin */
@font-face {
font-display: swap;
font-family: 'Ubuntu';
font-style: normal;
font-weight: 400;
src: url('/files/mate/fonts/ubuntu-v20-latin-regular.woff2') format('woff2');
}Then assign the font in the CSS variables in _custom_variables.scss as follows:
:root {
--font1: 'Ubuntu'; // Text light
--font2: 'Ubuntu'; // Überschriften
--font3: 'Ubuntu'; // Text normal
} $font1: 'Ubuntu'; // Text light
$font2: 'Ubuntu'; // Überschriften
$font3: 'Ubuntu'; // Text normalTo change the navigation colors, edit the variables under the heading Header and Navigation in _custom_variables.scss.
To activate a variable, simply remove the // at the beginning of the line.
Example: The following example changes the colors and backgrounds of the main navigation.
:root {
--navbar-bg-color: #437d4f; // Hintergrundfarbe der Navigation
--navbar-color: #fff; // Schriftfarbe der Links
--navbar-active-color: #000; // Schriftfarbe des aktiven Menüpunkts und bei Mouse-Hover
--navbar-dropdown-hover-bg-color: lighten(#437d4f, 10%); // Hintergrundfarbe des Dropdown-Menü bei Mouse-Hover
--navbar-dropdown-hover-color: #000; // Schriftfarbe des Dropdown-Menü bei Mouse-Hover
--navbar-dropdown-bg: #437d4f; // Hintergrundfarbe des Dropdown-Menü
--navbar-dropdown-color: #fff; // Schriftfarbe der Links im Dropdown-Menü
--navbar-search-color: #fff; // Farbe des Suchicons
}$navbar-bg-color: #437d4f; // Hintergrundfarbe der Navigation
$navbar-color: #fff; // Schriftfarbe der Links
$navbar-active-color: #000; // Schriftfarbe des aktiven Menüpunkts und bei Mouse-Hover
$navbar-dropdown-hover-bg-color: lighten(#437d4f, 10%); // Hintergrundfarbe des Dropdown-Menü bei Mouse-Hover
$navbar-dropdown-hover-color: #000; // Schriftfarbe des Dropdown-Menü bei Mouse-Hover
$navbar-dropdown-bg: #437d4f; // Hintergrundfarbe des Dropdown-Menü
$navbar-dropdown-color: #fff; // Schriftfarbe der Links im Dropdown-Menü
$navbar-search-color: #fff; // Farbe des SuchiconsThe following example changes the colors and backgrounds of the main navigation when scrolling down (when the navigation sticks to the top of the screen).
:root {
--navbar-stuck-bg-color: rgba(#437d4f, .8); // Hintergrundfarbe der Navigation
--navbar-stuck-color: #fff; // Schriftfarbe der Links
--navbar-stuck-active-color: #000; // Schriftfarbe des aktiven Menüpunkts und bei Mouse-Hover
--navbar-stuck-dropdown-hover-bg-color: lighten(#437d4f, 10%); // Hintergrundfarbe des Dropdown-Menü bei Mouse-Hover
--navbar-stuck-dropdown-hover-color: #000; // Schriftfarbe des Dropdown-Menü bei Mouse-Hover
--navbar-stuck-dropdown-color: #fff; // Hintergrundfarbe des Dropdown-Menü
--navbar-stuck-dropdown-bg: #437d4f; // Schriftfarbe der Links im Dropdown-Menü
--navbar-stuck-search-color: #fff; // Farbe des Suchicons
}$navbar-stuck-bg-color: rgba(#437d4f, .8); // Hintergrundfarbe der Navigation
$navbar-stuck-color: #fff; // Schriftfarbe der Links
$navbar-stuck-active-color: #000; // Schriftfarbe des aktiven Menüpunkts und bei Mouse-Hover
$navbar-stuck-dropdown-hover-bg-color: lighten(#437d4f, 10%); // Hintergrundfarbe des Dropdown-Menü bei Mouse-Hover
$navbar-stuck-dropdown-hover-color: #000; // Schriftfarbe des Dropdown-Menü bei Mouse-Hover
$navbar-stuck-dropdown-color: #fff; // Hintergrundfarbe des Dropdown-Menü
$navbar-stuck-dropdown-bg: #437d4f; // Schriftfarbe der Links im Dropdown-Menü
$navbar-stuck-search-color: #fff; // Farbe des SuchiconsThe following example changes the colors and backgrounds of the mobile navigation.
:root {
--navbar-mobile-menu-icon-color: #fff; // Farbe des mobilen Burgermenu-Icons
--navbar-stuck-mobile-menu-icon-color: #fff; // Farbe des mobilen Burgermenu-Icons, wenn die Navigation am oberen Bildschirmrand stehen bleibt
--navbar-mobile-background: #437d4f; // Hintergrundfarbe
--navbar-mobile-color: #fff; // Schriftfarbe der Links
--navbar-mobile-dropdown-background: lighten(#437d4f, 10%); // Hintergrundfarbe der weiteren Menüebenen
--navbar-mobile-dropdown-color: #fff; // Schriftfarbe der weiteren Menüebenen
}$navbar-mobile-menu-icon-color: #fff; // Farbe des mobilen Burgermenu-Icons
$navbar-stuck-mobile-menu-icon-color: #fff; // Farbe des mobilen Burgermenu-Icons, wenn die Navigation am oberen Bildschirmrand stehen bleibt
$navbar-mobile-background: #437d4f; // Hintergrundfarbe
$navbar-mobile-color: #fff; // Schriftfarbe der Links
$navbar-mobile-dropdown-background: lighten(#437d4f, 10%); // Hintergrundfarbe der weiteren Menüebenen
$navbar-mobile-dropdown-color: #fff; // Schriftfarbe der weiteren MenüebenenTo change the footer colors, edit the variables under the heading Footer in _custom_variables.scss.
Remove the // at the beginning of the line to activate the variable.
💡 Note: Some variables are only available from MATE version 2.11.0. It is best to update the theme to the latest version to be able to use all options.
:root {
--footer-newsletter-bg-color: #f1f1f1; // Hintergrundfarbe des Newsletter-Bereich
--footer-newsletter-color: #000; // Schriftfarbe des Newsletter-Bereich
--footer-newsletter-button-background: #b50000; // Hintergrundfarbe des Buttons im Newsletter-Bereich
--footer-newsletter-button-background-hover: lighten(#b50000,10%); // Hintergrundfarbe des Buttons bei Mouseover im Newsletter-Bereich
--footer-input-bg-color: rgba(#b50000,.3); // Hintergrundfarbe des Eingabefelds im Newsletter-Bereich
--footer-input-color: #000; // Schriftfarbe des Eingabefelds im Newsletter-Bereich
--footer-primary-bg-color: #dedede; // Hintergrundfarbe im Footer-Bereich unter dem Newsletter
--footer-primary-color: #000; // Schriftfarbe im Footer-Bereich unter dem Newsletter
--footer-primary-link-color: #b50000; // Linkfarbe im Footer-Bereich unter dem Newsletter
--footer-primary-link-color-hover: lighten(#b50000,10%); // Linkfarbe bei Mouseover im Footer-Bereich unter dem Newsletter
--footer-headline-border-color: #000; // Farbe der Rahmen unter den Überschriften
--footer-news-events-time-color: #7d7d7d; // Schriftfarbe des Datum bei News-/Eventsbeiträgen
--footer-secondary-bg-color: #b50000; // Hintergrundfarbe des Copyright-Bereich
--footer-secondary-color: #fff; // Schriftfarbe im Copyright-Bereich
--footer-secondary-link-color: #f7f7f7; // Linkfarbe im Copyright-Bereich
--footer-secondary-link-color-hover: darken(#f7f7f7,10%); // Linkfarbe bei Mouseover im Copyright-Bereich
}$footer-newsletter-bg-color: #f1f1f1; // Hintergrundfarbe des Newsletter-Bereich
$footer-newsletter-color: #000; // Schriftfarbe des Newsletter-Bereich
$footer-newsletter-button-background: #b50000; // Hintergrundfarbe des Buttons im Newsletter-Bereich
$footer-newsletter-button-background-hover: lighten(#b50000,10%); // Hintergrundfarbe des Buttons bei Mouseover im Newsletter-Bereich
$footer-input-bg-color: rgba(#b50000,.3); // Hintergrundfarbe des Eingabefelds im Newsletter-Bereich
$footer-input-color: #000; // Schriftfarbe des Eingabefelds im Newsletter-Bereich
$footer-primary-bg-color: #dedede; // Hintergrundfarbe im Footer-Bereich unter dem Newsletter
$footer-primary-color: #000; // Schriftfarbe im Footer-Bereich unter dem Newsletter
$footer-primary-link-color: #b50000; // Linkfarbe im Footer-Bereich unter dem Newsletter
$footer-primary-link-color-hover: lighten(#b50000,10%); // Linkfarbe bei Mouseover im Footer-Bereich unter dem Newsletter
$footer-headline-border-color: #000; // Farbe der Rahmen unter den Überschriften
$footer-news-events-time-color: #7d7d7d; // Schriftfarbe des Datum bei News-/Eventsbeiträgen
$footer-secondary-bg-color: #b50000; // Hintergrundfarbe des Copyright-Bereich
$footer-secondary-color: #fff; // Schriftfarbe im Copyright-Bereich
$footer-secondary-link-color: #f7f7f7; // Linkfarbe im Copyright-Bereich
$footer-secondary-link-color-hover: darken(#f7f7f7,10%); // Linkfarbe bei Mouseover im Copyright-BereichTo change the colors of content boxes (e.g. teaser boxes, news, events), edit the variables in _custom_colors.scss.
Remove the // at the beginning of the line to activate the variable.
:root {
--boxes-background: #333; // Hintergrundfarbe
--boxes-text-color: #fff; // Schriftfarbe
}$boxes-background: #333; // Hintergrundfarbe
$boxes-text-color: #fff; // SchriftfarbeTo change the content box, edit the variables in the Content Box section of _custom_variables.scss.
Simply remove the // at the beginning of the line to activate and adjust the variable.
:root {
--contentbox-first-color: #fff; // Schriftfarbe der 1. Content Box
--contentbox-second-color: #fff; // Schriftfarbe der 2. Content Box
--contentbox-first-background: #2d2d2d; // Hintergrundfarbe der 1. Content Box
--contentbox-second-background: #191919; // Hintergrundfarbe der 2. Content Box
}$contentbox-first-color: #fff; // Schriftfarbe der 1. Content Box
$contentbox-second-color: #fff; // Schriftfarbe der 2. Content Box
$contentbox-first-background: #2d2d2d; // Hintergrundfarbe der 1. Content Box
$contentbox-second-background: #191919; // Hintergrundfarbe der 2. Content BoxAll possible layouts are already created under Themes - Page layouts. Example integrations can be found on the Layouts page. You select the layout in the page under Layout settings.
For the one-column layout, select the page template fe_page_mate and enter the body class default-col. You set the page template and the body class in the page layout under Expert settings.
For the layout with a left column, select the page template fe_page_mate_left and enter the body class left-col.
For the layout with a right column, select the page template fe_page_mate_right and enter the body class right-col.
For the layout with a left and right column, select the page template fe_page_mate_leftright and enter the body class left-right-col.
If you want to use several domains with the MATE theme for Contao and each should have its own custom.scss, _custom_colors.scss
and _custom_variables.scss, you need a few adjustments. This guide shows you how.
You should have at least MATE theme version 2.9.1 installed.
As of Contao 4.12 the publicly accessible subfolder was renamed from /web to /public. If your installation has a /web directory, use web instead of public in the following code examples.
If you use the latest version of the MATE theme, you may wonder where _custom_colors.scss has gone.
Don’t worry: as of MATE version 3.5.0, a new installation of the MATE theme only has
_custom_variables.scss, which now contains all color and variable definitions.
What this means for you:
_custom_variables.scss and _custom_colors.scss remain._custom_variables.scss with all color and variable settings.Create a folder in the file manager under mate/sass (e.g. domain2). Copy the files custom.scss and _custom_variables.scss into this folder.
In _custom_variables.scss, adjust the path of the color schemes as follows.
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_green_colors_contrast';
@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_dark_colors_contrast';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_blue_colors_contrast';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_yellow_colors_contrast';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_red_colors_contrast';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_dark_colors';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_blue_colors';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_yellow_colors';
/* ============================= */
/* Automatic Dark Mode */
/* ============================= */
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/mate_color_schemes/mate_dark_mode';Create a folder in the file manager under mate/sass (e.g. domain2). Copy the files custom.scss, _custom_colors.scss and _custom_variables.scss into this folder.
In _custom_colors.scss, adjust the path of the color schemes as follows.
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/mate_color_schemes/mate_dark_colors';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/mate_color_schemes/mate_blue_colors';
//@import '../../../../public/bundles/contaothemesnetmatetheme/sass/mate_color_schemes/mate_yellow_colors';Create a folder in the file manager under mate/sass (e.g. domain2). Copy the files custom.scss, _custom_colors.scss and _custom_variables.scss into this folder.
In _custom_colors.scss, adjust the path of the color schemes as follows.
//@import '../../../../public/bundles/matetheme/sass/mate_color_schemes/mate_dark_colors';
//@import '../../../../public/bundles/matetheme/sass/mate_color_schemes/mate_blue_colors';
//@import '../../../../public/bundles/matetheme/sass/mate_color_schemes/mate_yellow_colors';In the same folder, also create a file mate.scss with the following content. If you installed the MATE theme in a local development environment, the file must be named mate_win.scss.
// variables;
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/v2/_mate_variables";
@import "_custom_variables";
// color
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/color-variables";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/color-classes";
// variables;
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/variables";
// reset
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/normalize";
// components
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/global";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/badges";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/icons-material-design";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/grid";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/navbar";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/typography";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/transitions";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/cards";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/toast";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/tabs";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/tooltip";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/buttons";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/dropdown";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/waves";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/modal";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/collapsible";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/chips";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/materialbox";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/forms/forms";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/table_of_contents";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/sidenav";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/preloader";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/slider";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/carousel";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/tapTarget";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/pulse";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/datepicker";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/timepicker";
// theme and custom styles
@import '../../../../public/bundles/contaothemesnetmatetheme/sass/v2/style';
@import 'custom';// variables;
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/_mate_colors";
@import "_custom_colors";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/_mate_variables";
@import "_custom_variables";
// color
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/color-variables";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/color-classes";
// variables;
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/variables";
// reset
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/normalize";
// components
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/global";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/badges";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/icons-material-design";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/grid";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/navbar";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/typography";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/transitions";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/cards";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/toast";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/tabs";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/tooltip";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/buttons";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/dropdown";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/waves";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/modal";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/collapsible";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/chips";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/materialbox";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/forms/forms";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/table_of_contents";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/sidenav";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/preloader";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/slider";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/carousel";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/tapTarget";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/pulse";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/datepicker";
@import "../../../../public/bundles/contaothemesnetmatetheme/sass/components/timepicker";
// theme and custom styles
@import '../../../../public/bundles/contaothemesnetmatetheme/sass/style';
@import 'custom';// variables;
@import "../../../../public/bundles/matetheme/sass/_mate_colors";
@import "_custom_colors";
@import "../../../../public/bundles/matetheme/sass/_mate_variables";
@import "_custom_variables";
// color
@import "../../../../public/bundles/matetheme/sass/components/color-variables";
@import "../../../../public/bundles/matetheme/sass/components/color-classes";
// variables;
@import "../../../../public/bundles/matetheme/sass/components/variables";
// reset
@import "../../../../public/bundles/matetheme/sass/components/normalize";
// components
@import "../../../../public/bundles/matetheme/sass/components/global";
@import "../../../../public/bundles/matetheme/sass/components/badges";
@import "../../../../public/bundles/matetheme/sass/components/icons-material-design";
@import "../../../../public/bundles/matetheme/sass/components/grid";
@import "../../../../public/bundles/matetheme/sass/components/navbar";
@import "../../../../public/bundles/matetheme/sass/components/typography";
@import "../../../../public/bundles/matetheme/sass/components/transitions";
@import "../../../../public/bundles/matetheme/sass/components/cards";
@import "../../../../public/bundles/matetheme/sass/components/toast";
@import "../../../../public/bundles/matetheme/sass/components/tabs";
@import "../../../../public/bundles/matetheme/sass/components/tooltip";
@import "../../../../public/bundles/matetheme/sass/components/buttons";
@import "../../../../public/bundles/matetheme/sass/components/dropdown";
@import "../../../../public/bundles/matetheme/sass/components/waves";
@import "../../../../public/bundles/matetheme/sass/components/modal";
@import "../../../../public/bundles/matetheme/sass/components/collapsible";
@import "../../../../public/bundles/matetheme/sass/components/chips";
@import "../../../../public/bundles/matetheme/sass/components/materialbox";
@import "../../../../public/bundles/matetheme/sass/components/forms/forms";
@import "../../../../public/bundles/matetheme/sass/components/table_of_contents";
@import "../../../../public/bundles/matetheme/sass/components/sidenav";
@import "../../../../public/bundles/matetheme/sass/components/preloader";
@import "../../../../public/bundles/matetheme/sass/components/slider";
@import "../../../../public/bundles/matetheme/sass/components/carousel";
@import "../../../../public/bundles/matetheme/sass/components/tapTarget";
@import "../../../../public/bundles/matetheme/sass/components/pulse";
@import "../../../../public/bundles/matetheme/sass/components/datepicker";
@import "../../../../public/bundles/matetheme/sass/components/timepicker";
// theme and custom styles
@import '../../../../public/bundles/matetheme/sass/style';
@import 'custom';Under Templates, create a new template fe_page_mate.html5 and rename it (e.g. fe_page_mate_domain2.html5).
In line 15, add the newly created folder from the file manager to getCombinedStylesheet().
<link rel="stylesheet" type="text/css" media="all" href="<?= ContaoThemesNet\MateThemeBundle\ThemeUtils::getCombinedStylesheet('domain2'); ?>">Go to Themes and Edit the page layouts of the theme (4th icon from the right) and duplicate any layout (e.g. default). You can name it e.g. “default - domain2”. Edit the layout and select the fe_page template you just created under Expert settings (at the very bottom) in Page template.
Finally, assign the layout to a page.
If you add the following line to custom.scss, you can use various classes on content elements to adjust the spacing (margin/padding).
@import 'spacing-helpers';| Classes | Explanation |
|---|---|
| for all screen sizes | |
m-10, m-20 … m-100 | Margin (10px, 20px … 100px) |
mt-10, mt-20 … mt-100 | Margin top (10px, 20px … 100px) |
mb-10, mb-20 … mb-100 | Margin bottom (10px, 20px … 100px) |
ml-10, ml-20 … ml-100 | Margin left (10px, 20px … 100px) |
mr-10, mr-20 … mr-100 | Margin right (10px, 20px … 100px) |
p-10, p-20 … p-100 | Padding (10px, 20px … 100px) |
pt-10, pt-20 … pt-100 | Padding top (10px, 20px … 100px) |
pb-10, pb-20 … pb-100 | Padding bottom (10px, 20px … 100px) |
pl-10, pl-20 … pl-100 | Padding left (10px, 20px … 100px) |
pr-10, pr-20 … pr-100 | Padding right (10px, 20px … 100px) |
| only for screen size > 600px | |
m-m-10, m-m-20 … m-m-100 | Margin (10px, 20px … 100px) |
mt-m-10, mt-m-20 … mt-m-100 | Margin top (10px, 20px … 100px) |
mb-m-10, mb-m-20 … mb-m-100 | Margin bottom (10px, 20px … 100px) |
ml-m-10, ml-m-20 … ml-m-100 | Margin left (10px, 20px … 100px) |
mr-m-10, mr-m-20 … mr-m-100 | Margin right (10px, 20px … 100px) |
p-m-10, p-m-20 … p-m-100 | Padding (10px, 20px … 100px) |
pt-m-10, pt-m-20 … pt-m-100 | Padding top (10px, 20px … 100px) |
pb-m-10, pb-m-20 … pb-m-100 | Padding bottom (10px, 20px … 100px) |
pl-m-10, pl-m-20 … pl-m-100 | Padding left (10px, 20px … 100px) |
pr-m-10, pr-m-20 … pr-m-100 | Padding right (10px, 20px … 100px) |
| only for screen size > 992px | |
m-l-10, m-l-20 … m-l-100 | Margin (10px, 20px … 100px) |
mt-l-10, mt-l-20 … mt-l-100 | Margin top (10px, 20px … 100px) |
mb-l-10, mb-l-20 … mb-l-100 | Margin bottom (10px, 20px … 100px) |
ml-l-10, ml-l-20 … ml-l-100 | Margin left (10px, 20px … 100px) |
mr-l-10, mr-l-20 … mr-l-100 | Margin right (10px, 20px … 100px) |
p-l-10, p-l-20 … p-l-100 | Padding (10px, 20px … 100px) |
pt-l-10, pt-l-20 … pt-l-100 | Padding top (10px, 20px … 100px) |
pb-l-10, pb-l-20 … pb-l-100 | Padding bottom (10px, 20px … 100px) |
pl-l-10, pl-l-20 … pl-l-100 | Padding left (10px, 20px … 100px) |
pr-l-10, pr-l-20 … pr-l-100 | Padding right (10px, 20px … 100px) |
| only for screen size > 1200px | |
m-xl-10, m-xl-20 … m-xl-100 | Margin (10px, 20px … 100px) |
mt-xl-10, mt-xl-20 … mt-xl-100 | Margin top (10px, 20px … 100px) |
mb-xl-10, mb-xl-20 … mb-xl-100 | Margin bottom (10px, 20px … 100px) |
ml-xl-10, ml-xl-20 … ml-xl-100 | Margin left (10px, 20px … 100px) |
mr-xl-10, mr-xl-20 … mr-xl-100 | Margin right (10px, 20px … 100px) |
p-xl-10, p-xl-20 … p-xl-100 | Padding (10px, 20px … 100px) |
pt-xl-10, pt-xl-20 … pt-xl-100 | Padding top (10px, 20px … 100px) |
pb-xl-10, pb-xl-20 … pb-xl-100 | Padding bottom (10px, 20px … 100px) |
pl-xl-10, pl-xl-20 … pl-xl-100 | Padding left (10px, 20px … 100px) |
pr-xl-10, pr-xl-20 … pr-xl-100 | Padding right (10px, 20px … 100px) |
With version 3.5.0 the MATE theme was made accessible and all SCSS variables were switched to CSS variables. This means a manual intermediate step is necessary when updating from an older version (< 3.5.0) to a newer version (≥ 3.5.0).
As of version 3.5.0 the file _custom_colors.scss no longer exists.
All color definitions are now in _custom_variables.scss.
📂 Old structure (< 3.5.0)
mate/sass/
├── custom.scss
├── _custom_variables.scss
└── _custom_colors.scss📂 New structure (≥ 3.5.0)
mate/sass/
├── custom.scss
└── _custom_variables.scssAfter the update to 3.5.0 or higher the site still works, but not all new features are available right away. You should therefore create the current theme files.
mate, e.g. to mate-alt.mate with the current files is created.Moving images:
If there were images in the old mate folder, move them either into the new folder or into a separate image folder.
References are kept if the images were added in Contao via “Add an image”.
If you made changes in custom.scss, _custom_colors.scss or _custom_variables.scss, you have to transfer them manually to the new files.
Important: V2 uses CSS variables instead of SCSS variables.
Before (V1 – SCSS):
New (V2 – CSS variables):
CSS variables are used in code like this:
If your custom.scss still uses SCSS variables ($variable),
change them to the CSS variable format (var(--variable)).
Example:
You find detailed tips, new features from version 3.5.0 and best practices for accessible design here: ♿ Accessibility in the MATE theme
You find the current _custom_variables.scss here:
📄 GitHub: _custom_variables.scss
If you want to adjust the files manually, the sass folder must also contain an empty file named .v2 to activate the V2 structure.
With version 3.5.0 the MATE theme was thoroughly revised with regard to accessibility and switched to CSS variables. To use these features, a manual intermediate step is necessary when updating from an older version (< 3.5.0) to a newer version (≥ 3.5.0). ➡️ Guide: Update to CSS variables
Version 3.2.0 adds controls to the header to:
If you install the MATE theme from version 3.2.0 and import the demo, the icons are already in the header.
Nature Theme Elemente -> 01_Header.MATE01/06 under Template settings.contrast-size-switcher to the article.wcag.MATE01/06 is included automatically via the navigation template.mod_navigation_nature.html5, add the insert tag there manually.<?php if($this->showMobileMenu == 1): ?>
<ul id="mobile-menu<?= $this->id ?>" class="mobile-menu sidenav hc-bg-black-ter <?= $this->level ?>">
<?= $this->mobileNav ?>
<li>
<!-- contrast and size switcher -->
{{theme::content::MATE01/06}}
</li>
</ul>
<?php endif; ?>To avoid redundant links (e.g. image, headline and button all linked), it is enough to link only the button. This improves keyboard navigation.
Adapted templates are available for various content elements such as teaser box, content box etc.
These templates have the suffix _bf (German “barrierefrei”, accessible).
When creating content, pay attention to the following:
For the content box, select the element type Content box. You can change the background color by giving the element classes (e.g. “grey lighten-3”, for more information see the section Colors) or by adjusting the CSS (custom.scss). How to display elements side by side is explained in the section Grid.
For the element Content slider (wrapper start), select the template ce_sliderStart_mate. For the closing element Content slider (wrapper end), select the template ce_sliderStop_mate. The slider is styled as in the following example if the text elements get the class slidebox1.
If you give the wrapper start element the class smaller, the content slider is displayed with a height of only 250px.
To create a content slider like in the following example, place text elements between the elements Content slider (wrapper start) and Content slider (wrapper end).
Give the element of type wrapper start the classes slider slider-text-below-image in the second input field
under Expert settings, and select the template ce_sliderStart_mate under Template settings.
For the element of type wrapper end, select the template ce_sliderStop_mate.
You find an example in the MATE theme demo on the page Content Slider.
This is what the content slider should look like:

Selecting the template and setting the classes in the wrapper start element:

Version 2.1.0 of the MATE theme added the CountTo feature. It counts numbers up when they come into view. You find an example in the MATE theme demo.
To display the elements side by side as in the example, place text elements between an element of type Grid (grid start) and Grid (grid stop). In the text element you can set the column widths under Advanced CSS classes, see image. The section Grid explains this in more detail.
Give the grid start element the class count-to-container under Expert settings, otherwise
it is not styled as in the example.
Use our Material Icons insert tag to add an
icon, e.g. {{mi::place}}. place is the name of the icon in this case and can be replaced as you like.
You also find a list of the Material Icons and their names in our
documentation.
In our example, the label is set as an h6 heading in the text.
For the number, also use our CountTo insert tag, e.g. {{countTo::929::founded}}. The second part
is always the number, the third part is an ID. If you include several insert tags on one page,
each must have a unique ID.
For the header image, select the element type Image and the template ce_image_mate_headerimage (up to Contao 4.13) or content_element/image/header_image_mate (Contao 5.0 and later). You can choose the visible part of the image by setting the important part of the image.
You find an example integration of a normal header image on the layout pages of the demo site. An example integration of a narrow header image is on the Contact page.
Narrow header image:
For a narrower header image, give the element the class smaller.

Left-aligned header image:
For a left-aligned header image, simply give the element the class left.
Right-aligned header image:
For a right-aligned header image, simply give the element the class right.
If a content element with a headline gets the class bordered-left or bordered-right, the headline is displayed with a border at the bottom left or bottom right.
If a link should look like a button (white text on a green background), give the link the class btn.
Depending on how many thumbnails per row should be displayed, the arrangement of the images adapts automatically and takes up all the available space.
Only available from MATE theme version 2.12.0!
For a carousel image gallery, create an element of type Gallery. You can set the number of images per row in the field Thumbnails per row. With Full-size view/new window the image can also be opened in a lightbox (the j_colorbox template must be added to the layout for this). You should also create an image size (important part, e.g. 400x400 or 200x200), as the carousel is designed for square images.
In the template settings under Content element template, select one of the following templates:
In the template settings under Gallery template, select one of the following templates:
Template: content_element/gallery/carousel / gallery_carousel
Template: content_element/gallery/carousel_with_indicators / gallery_carousel_with_indicators
Template: content_element/gallery/carousel_large / gallery_carousel_large
Template: content_element/gallery/carousel_large_with_indicators / gallery_carousel_large_with_indicators
For a YouTube video, select the template ce_youtube_mate (only up to Contao 4.13).
The news slider displays news items in a slider. The slider is included on the home page of the
demo site. In the theme, the slider is included in the article Start in the header via the insert tag
{{theme::content::MATE02/01}}.
You do not need content slider wrapper elements; you only have to include a module of type Newslist. Select news_mate_slider as the news template and mod_newslist_mate_slider as the custom template. The total number of items can be chosen freely.
You select the image and the teaser texts in the settings of each news item.
To swap the position of text and image, edit the item settings of the news and add the CSS class image-right under Expert settings.
As of version 2.8.0 you can adjust the slider settings (height, interval, transition speed and navigation) in the module Newslist.
You can integrate an area for newsletter subscriptions in the footer. The newsletter box is included in the
module Footer via the insert tag {{theme::content::MATE02/01}}. The module itself is included in an article
under MATE Elements - Moduls - 02/02 newsletter. For the CSS to be loaded, the article must have the ID
newsletter.
Version 2.1.0 of the MATE theme added the parallax element. Place an element of type Parallax element in the article. There you can set a headline, the text, the height, a link and an image. You find examples of parallax elements in the MATE theme demo.
If you select ce_mate_parallax_container under Custom template in the template settings, the text
is displayed as wide as the normal content of the website.
You can give an element of element type Text a white background with some padding by assigning the custom template ce_text_simplebox_mate to the element.
For the teaser box, select the element type Teaser box. You can adjust the width of the boxes by assigning CSS classes. If you add an image, select the image size Teaser-Box (450x270).
This feature was added in MATE theme version 2.21.0.
If you add an image, the image alignment (left or right) controls whether the image is displayed to the left or right of the text.
Under Teaser box settings you can select a page to link to and enter the link text.
The field Card CSS class changes the background and text color. You can use the classes
of the Materialize color palette.
To change the background, add e.g. the following classes: red, red lighten-5.
To change the text color, use e.g. the classes white-text and black-text.
Under Template settings, select the template ce_mate_teaserbox_card.
This is what it could look like. You find more examples in our theme demo.
This error can occur if you customized the template ce_mate_teaserbox.html5.
Replace the following line …
{{picture::<?= $this->picture ?>?size=10&alt=<?= $this->metaImg[$GLOBALS['TL_LANGUAGE']]['alt'] ?>}}
… with the following line:
<?php $this->insert('image', $this->arrData); ?>
You can then select the image size in the content element.
Version 2.1.0 of the MATE theme added a testimonial slider. You find examples in the MATE theme demo.
First place an element of type Content slider (wrapper start) and one of type Content slider (wrapper end). Between them you can place as many elements of type Text element with background image as you like. There you can enter a text and set an image (profile picture) and a background image.
If the slider should be displayed narrow (see documentation), give the element Content slider
(wrapper start) the class smaller under Expert settings (the second input field).
Example of a testimonial slider:
Placement of the elements in the article:
Selecting the element type and entering the text:
Selecting the image (profile picture):
Selecting the background image:
You can remove the blur of the background image with the following CSS, which has to be added to custom.scss under files/mate/sass:
.ce_mateTextBackgroundElement .bg-image {
filter: none;
}To add a breadcrumb, create a new module of type Breadcrumb navigation under Themes > Edit the front end modules of the theme (gear icon). Select mod_breadcrumb_mate as the custom template.
Then go back to Themes and edit the page layouts of the theme (to the right of the gear icon). Under Front end modules - Included modules, add a new row by clicking the green plus. Select the module you just created and Header as the layout section.
In the end, the breadcrumb should look like the following example.
To show the news or event title in the breadcrumb on the news and event detail view, you can
use the following insert tag in the page name: {{page::pageTitle}}
For an event list with images and a teaser text, select the template event_mate_teaser and the image size News-Box (520x350) in the module. In the module of the detail view, select the template event_mate_full.
For an event list without images and with a teaser text, select the template event_mate_list in the module. In the module of the detail view, select the template event_mate_full.
For a simple event list without images and teaser text, select the template event_mate_upcoming in the module. In the module of the detail view, select the template event_mate_full.
Changing the number of columns:
To change the number of columns, you only have to adjust the template and the classes, e.g.
col s12 m4 to display the list in three columns on desktops and in one column on mobile devices. How exactly to use
the classes is explained on the following page: Grid.
<div class="event layout_teaser<?= $this->classUpcoming ?> col s12 m4">
[...]
</div>For the file upload field, select the custom template form_mate_upload.
For the module type Login form, select the custom template mod_login_mate.
As of version 2.0.0 of the MATE theme you can add modal dialogs with a module. Go to the front end modules and create a new module of type Modal. There you can set a link, give it additional classes and edit the actual content of the modal dialog. You can include the module anywhere, e.g. in an article.
If the modal dialog should be fixed to the bottom of the screen, add the class bottom-sheet in the field CSS classes for the modal dialog.
There is a separate module type Navbar for navigations. In the navbar settings (see image 1) you can choose between different navbar types:
You find example integrations under the menu item Modules - Navigation.
The navigation template mod_mate_navbar is used.
The navigation template mod_mate_navbar_left is used.
The navigation template mod_mate_navbar_left is used.
The navigation template mod_mate_navbar is used.
For a subpage navigation, as placed in the left and right column of the demo, for example, select the navbar type Navigation without dropdown, left-aligned and give the module the class subnav. Hide the logo, search and mobile navigation.
If the custom navigation should look like the subpage navigation, select the navigation template nav_mate_left_customnav and add the class subnav under Expert settings.
If the news archive menu should look like the subpage navigation, select the module template mod_newsmenu_mate.
For news with images and a teaser text, select the template news_mate_latest and the image size News-Box (520x350) in the module. In the module of the detail view, select the template news_mate_full.
For news without images and with a teaser text, select the template news_mate_short in the module. In the module of the detail view, select the template news_mate_full.
There is no separate template for a simple news list without images and teaser text. In the module of the detail view, select the template news_mate_full.
Changing the number of columns:
To change the number of columns, you only have to adjust the template and the classes, e.g.
col s12 m4 to display the list in three columns on desktops and in one column on mobile devices. How exactly to use
the classes is explained on the following page: Grid.
<div class="layout_latest arc_<?= $this->archive->id ?> block<?= $this->class ?> col s12 m4">
[...]
</div>For the search engine module, select the template search_mate.
With the extension euf_overlay you can create an overlay (also known as a popup or popover) that is displayed on top of the actual website.
For the overlay to cover all other content of the MATE theme, an adjustment in custom.scss is necessary.
#euf_overlay {
z-index: 5;
}If you want to include a Google Maps map, install the package delahaye/dlh_googlemaps with the Contao Manager.
On the contact page there is a placeholder image next to the contact form where, for example, a Google Maps map could be included. If the map should be displayed there, give the element the classes col s12 m5.
The MATE theme uses the front-end framework Materialize, based on Material Design.
You find the palette of colors that Materialize provides on the Materialize website or in the theme under Elements and Colors. Each color consists of a base class and optional classes that make the color lighter or darker.
To change the background color of an element, simply add a class with the color name and a class with the desired lightness level to the element.
To set a text color, simply use the color name with the suffix -text.
Materialize uses a 12-column grid system. You also find examples and explanations on the Materialize website.
| Mobile devices | Tablets | Desktops | Large desktops | |
|---|---|---|---|---|
| Resolution | <= 600px | > 600px | > 992px | > 1200px |
| Class prefix | .s | .m | .l | .xl |
| Number of columns | 12 | 12 | 12 | 12 |
The class col must always come first. If several elements should be displayed side by side,
the parent element must get the class row. For example, the classes col s12 m6 l4
make the element …
The extension Advanced Classes is used to assign these classes to elements. You can add the classes to content elements under Advanced CSS classes (see image 3), although not all elements are supported (e.g. the teaser or content box). If an element is not supported, add the classes manually under Expert settings.
Image 3: Setting advanced CSS classes
For the elements to be displayed correctly, the surrounding element must get the class row. The extension Contao Bootstrap Grid is used for this. Simply create an element of element type Grid Start and select the grid Umschlag mit Klasse row (see image 4). It should then look like image 5. The grid stop element is created automatically.
Under Themes and Manage grid definitions (the second-to-last icon) an empty grid element was created that makes sure a div element with the class row is created.
Image 4: Creating a grid wrapper
Image 5: Elements in a grid wrapper
To use icons, simply give the element the class material-icons and the icon name as content. You find all icons and their names either on the Material Design website or in the theme under Elements and Icons.
For example:
<i class="material-icons">insert_schedule</i>You can change size and color by adding further classes.
To build a multilingual website with the MATE theme, you can install the extension Contao Multilingual Pages [i18nl10n]. Then you do not have to duplicate the site structure, only the elements that are displayed in different languages. You find documentation for Contao 3 here; there is none for Contao 4 yet.
Alternatively, you can create a site structure for each language without this extension. You find more about this in the Contao manual.
If you do not want to duplicate the site structure, install the extension exploreimpact/contao-i18nl10n with the Contao Manager.
In the website root of the site structure you can select the alternative languages under i18nl10n settings.
Under the menu item Multilingual pages, add the pages in the other languages. To create all pages, click L10N for all.
The elements now have the option to select the language under L10n settings. Select Neutral if the element should be displayed in all languages.
If you prefer to work with several site structures, select the corresponding website root under MATE Elements in the article settings under Template settings.
The MATE theme uses the following extensions:
The module extends the CSS classes of Contao elements with sets of CSS classes you can define yourself. Editors and admins can quickly access predefined CSS classes via select fields. You set the classes in a content element under Advanced CSS classes (see image 1).
The Bootstrap Grid module is only used to wrap several elements that should be displayed side by side in a DIV with the class row (see image 2). For this, an empty grid element was created under Themes and Manage grid definitions (the second-to-last icon).
Contao SEO Serp Preview shows in a page how the page would look in the Google search results. In the site structure you can also use the button Enable SERP to see where a page title or page description is still missing.
The MATE theme already comes with templates and stylesheets for the Real Estate Module (Maklermodul).
The Real Estate Module documentation contains all information on installing and setting up the module.
Add the following line to custom.scss (/files/mate/sass) so that the list and detail view are displayed as in the screenshots.
@import 'maklermodul';First create one page each for the list view and the detail view.
Create a module of type Immobilienliste as described in the documentation.
Create a module of type Expose as described in the documentation.
Create a module of type MaklerModul Kopfbild as described in the documentation.
Place the modules for the list view and the exposé in the articles of the respective pages. For the header image, create another article placed in the header (above the article of the detail view).
If you have carried out all steps as described, the list should be displayed as in the following screenshots.
With the Social Feed Bundle you can display posts from Facebook and Instagram in the MATE theme. Simply install the package named pdir/social-feed-bundle with the Contao Manager.
A guide on setting up the feed can be found on the following page: Social Feed documentation.
Single-column social media stream (example integration in the left column)
Two-column social media stream
Three-column social media stream
If you use the Tabcontrol extension by Christian Barkowsky and want to link to a tab, you can do this with anchors, e.g. www.example.org/page.html#tabControl_tabname. It is important that the ID always starts with tabControl_, otherwise the MATE theme tries to scroll to the anchor on the same page. The panel must also have the corresponding ID.
The MATE theme already comes with templates and stylesheets for the Vehicle Manager (Fahrzeugmanager).
The documentation contains all information on installing and setting up the Vehicle Manager.
Add the following line to custom.scss so that the list and detail view are displayed as in the screenshots.
@import 'mobilede';First create one page each for the list view and the detail view.
Create a content element of type Fahrzeug Manager Listenansicht as described in the documentation.
Create a module of type Fahrzeug Manager Detailansicht as described in the documentation.
You can easily update the theme with the Contao Manager. Then open the install tool and update the database.
A database backup beforehand never hurts!
Version 2.0 of the MATE theme uses version 1.0.0 of the Materialize framework instead of version 0.100.2. If you made template, JavaScript or CSS customizations, you may have to make changes after the update, as e.g. CSS classes were renamed and functions have to be called differently. This new version fixes several bugs that occurred with newer browser versions.
You find a complete list of all changes in version 1.0.0 of the Materialize framework here.
MATE 1.x
<?php if($this->showMobileMenu == 1): ?>
<a href="#" data-activates="mobile-menu<?= $this->id ?>" class="button-collapse"><i class="material-icons">menu</i></a>
<?php endif; ?>
<?php if($this->showMobileMenu == 1): ?>
<ul id="mobile-menu<?= $this->id ?>" class="mobile-menu side-nav <?= $this->level ?>">
<?= $this->mobileNav ?>
</ul>
<?php endif; ?>MATE 2.0
<?php if($this->showMobileMenu == 1): ?>
<a href="#" data-target="mobile-menu<?= $this->id ?>" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<?php endif; ?>
<?php if($this->showMobileMenu == 1): ?>
<ul id="mobile-menu<?= $this->id ?>" class="mobile-menu sidenav <?= $this->level ?>">
<?= $this->mobileNav ?>
</ul>
<?php endif; ?>MATE 1.x
<?php if (!empty($item['subitems'])): ?> data-activates="nav<?= $this->id ?>dropdown<?= $item['id'] ?>"<?php endif; ?>MATE 2.0
<?php if (!empty($item['subitems'])): ?> data-target="nav<?= $this->id ?>dropdown<?= $item['id'] ?>"<?php endif; ?>MATE 1.x
$(".sidenav").sideNav();
MATE 2.0
$(".sidenav").sidenav();
MATE 1.x
$('select').material_select();
MATE 2.0
$('select').formSelect();
If you customized the template form_radio.html5, an adjustment is necessary because the HTML structure changed slightly.
MATE 1.x
<?php if ($option['type'] == 'option'): ?>
<span><input type="radio" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="radio" value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>> <label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>"><?= $option['label'] ?></label></span>
<?php endif; ?>MATE 2.0
<?php if ($option['type'] == 'option'): ?>
<label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>">
<input type="radio" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="radio" value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>>
<span><?= $option['label'] ?></span>
</label>
<?php endif; ?>If you customized the template form_checkbox.html5, an adjustment is necessary because the HTML structure changed slightly.
MATE 1.x
<?php if ($option['type'] == 'option'): ?>
<span><input type="checkbox" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="checkbox" value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>> <label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>"><?= $option['label'] ?></label></span>
<?php endif; ?>MATE 2.0
<?php if ($option['type'] == 'option'): ?>
<label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>">
<input type="checkbox" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="checkbox" value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>>
<span><?= $option['label'] ?></span>
</label>
<?php endif; ?>MATE 1.x
$inputDatepicker = $('.datepicker').pickadate({
selectMonths: true,
selectYears: '150',
max: new Date( new Date().getFullYear() + 30, new Date().getMonth(), new Date().getDate() ),
closeOnSelect: true,
format: 'dd.mm.yyyy',
container: 'div.datepicker',
labelMonthNext: 'Nexter Monat',
labelMonthPrev: 'Vorheriger Monat',
labelMonthSelect: 'Monat wählen',
labelYearSelect: 'Jahr wählen',
monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ],
monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ],
weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ],
weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ],
weekdaysLetter: [ 'S', 'M', 'D', 'M', 'D', 'F', 'S' ],
today: 'Heute',
clear: 'Löschen',
close: 'OK',
firstDay: 1
});
$inputDatepicker.pickadate('picker');MATE 2.0
$('input.datepicker').datepicker({
selectMonths: true,
selectYears: '150',
maxDate: new Date( new Date().getFullYear() + 30, new Date().getMonth(), new Date().getDate() ),
autoClose: true,
format: 'dd.mm.yyyy',
container: 'div.datepicker',
firstDay: 1,
i18n: {
nextMonth: 'Nexter Monat',
previousMonth: 'Vorheriger Monat',
labelMonthSelect: 'Monat wählen',
labelYearSelect: 'Jahr wählen',
months: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ],
monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ],
weekdays: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ],
weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ],
weekdaysAbbrev: ['S','M','D','M','D','F','S'],
today: 'Heute',
clear: 'Löschen',
done: 'OK',
cancel: 'Abbrechen'
}
});MATE 1.x
$inputTimepicker = $('.timepicker').pickatime({
default: 'now',
fromnow: 0,
twelvehour: false,
donetext: 'OK',
cleartext: 'Reset',
canceltext: 'Abbrechen',
autoclose: false,
ampmclickable: true,
aftershow: function(){},
container: 'div.timepicker'
});
$inputTimepicker.pickatime('picker');MATE 2.0
$('input.timepicker').timepicker({
defaultTime: 'now',
fromNow: 0,
twelveHour: false,
autoClose: false,
container: 'div.timepicker',
i80n: {
done: 'OK',
clear: 'Löschen',
cancel: 'Abbrechen'
}
});If you ran into problems during installation or setup, or you noticed a display error of the theme in a particular browser, please create a new ticket at:
Please check first whether your problem is already known.