Themes
Choose your theme:
Choose your theme:
Quick start
The theme documentation covers the following topics:
The theme can only be installed into an empty Contao installation and is compatible with Contao 4.4 or higher.
Contao 4 requires a web server such as Apache or NGINX with PHP and MySQL support. Our theme requires Contao 4.4 or higher and PHP 5.6.
We recommend Contao 4.9 with PHP 7.1 or higher to get the best possible loading time with our theme!
The theme is easy to install with the Contao Manager. You find an installation guide here.
The 0.1 theme is available free of charge (with copyright notice) or as a paid version (without copyright notice).
You can buy the paid license on contao-themes.net. Select the option without copyright notice, enter your domain and click the button Add to cart. Then go to checkout and follow the steps.
After successful payment (possible payment methods are PayPal, Sofort bank transfer or credit card) you receive an invoice by email, and we will activate your domain shortly, so that you can register it in the Contao back end.
Until then, you can already install and use the theme with the copyright notice.
As the holder of a paid license you receive 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 theme you ordered to support[AT]pdir.dev, so that we can activate the theme domain in the back end.
If you have bought a license and 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, edit the theme and enter 0.1 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, find the article 03 Copyright under Elements > 03 Footer and edit it with the pencil icon.
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 this guide: Installation into an existing Contao installation.
Open the Contao Manager: www.your-domain.com/contao-manager.phar.php. In the Discover tab, enter 0.1 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 has finished, click Update database.
Run all database migrations and click Continue. In the first step, all folders and files are created 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 message: This page isn’t working / The page redirected you too many times
Edit the root page and set the protocol under URL settings to http:// or https://, depending on how your site should be accessed.
Error message: imagick not installed
If the error message imagick not installed occurs with PHP 8.0, you can fix it with an
adjustment in config.yml and then clearing the cache. More information in the PDIR blog post (in 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!
First open the Contao Manager at the following URL: www.your-domain.com/contao-manager.phar.php. Click Discover, enter 0.1 theme in the search field and add the package 0.1 Theme.
Then switch to Packages, enter the version ^1.0 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 2.x, which is only compatible with Contao 5.
Then open the install tool and update the database. In the install tool you also have to create an admin user account.
You reach the install tool in the Contao Manager via the menu item Tools or at the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select 0.1 Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. This creates all files in the file manager in the folder zeroOne and copies the SQL files for the database import to the templates folder.
Then empty the database table ’tl_files’ by clicking the button Empty table ’tl_files’. This step must be done before importing the database.
Emptying the tl_files table deletes the image references. This is only necessary for the first installation of the theme.
Now open the install tool. In the tab “Import a template” you can import a .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 selected 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 see a message that a template was imported, as shown in the screenshot.
Then switch back to the Contao back end, select System maintenance and recreate the symlinks by ticking Recreate symlinks and then clicking the button Purge data.
Under Advanced CSS settings, select the class set spectre.json.
Error message: This page isn’t working / The page redirected you too many times
Edit the root page and set the protocol under URL settings to http:// or https://, depending on how your site should be accessed.
Error message: imagick not installed
If the error message imagick not installed occurs with PHP 8.0, you can fix it with an
adjustment in config.yml and then clearing the cache. More information in the PDIR blog post (in German)
You edit the header content in the articles under Elements > 01 Header.
You edit the footer content in the articles under Elements > 03 Footer.
If you want to receive contact form submissions by email, select Form generator in the left navigation and edit the form settings (the second icon). Under Send form data, replace the email address.
Once the theme has been installed, the SCSS files are located in the file manager under zeroOne/scss. For your own customizations, simply use custom.scss, where you can write both SCSS and plain CSS, and _custom_variables.scss.
In _custom_variables.scss you can change the colors and the font of the theme and select a different color scheme. To change a variable, uncomment the line (remove the slashes).
If the SCSS file was not edited with the Contao editor but uploaded with an FTP program, clear the script cache under system maintenance in the Contao back end and reload the page with Ctrl + F5 if necessary.
Do not rename the theme folder zeroOne in the file manager, otherwise the SCSS files will no longer be loaded. You don’t need to include the files in the page layout yourself; the theme loads them automatically.
By default, the 0.1 theme comes with a light layout in orange/yellow colors. You can also activate other color schemes:
To switch to a different layout, uncomment (remove the slashes) the line with the desired color scheme in the section Colour Schemes of _custom_variables.scss. You may have to reload the page in the browser with Ctrl + F5 for the changes to take effect.
Example for activating the EARTH color scheme:
@import 'colour_schemes/earth';
//@import 'colour_schemes/night';@import '#{$scssPath}/colour_schemes/earth';
//@import '#{$scssPath}/colour_schemes/night';If the variable $scssPath doesn’t exist in _custom_variables.scss yet, add it before the
import statements.
$scssPath: "../../../vendor/contao-themes-net/zero-one-theme-bundle/src/Resources/public/scss";
Many devices and apps now offer a dark mode that shows the user interface in dark colors and the text in light colors for better readability. When dark mode is active, the 0.1 theme automatically switches to a darker color scheme, no matter which color scheme you have activated. This is easier on the eyes and can also improve battery life thanks to the lower lighting energy.
If you prefer, you can disable dark mode by commenting out the following line in _custom_variables.scss (put two slashes at the beginning of the line):
//@import 'colour_schemes/dark_mode';//@import '#{$scssPath}/colour_schemes/dark_mode';In the 0.1 theme, the images of news, events and the parallax element are automatically tinted to match the selected color scheme with CSS image filters. In the DAY color scheme images appear yellow/orange, while in the NIGHT scheme a violet filter is placed over the images. You can tint any image with these color filters by adding the class css-filter to the image element.
You can also disable the automatic color filters. To do so, comment out the following line in _custom_variables.scss (put two slashes at the beginning of the line).
This feature is supported by all current browsers (except Internet Explorer).
//@import 'colour_schemes/adjust_images';//@import '#{$scssPath}/colour_schemes/adjust_images';To change colors and the font, uncomment the corresponding lines in _custom_variables.scss (remove the slashes).
| Variable | Meaning |
|---|---|
| $body-font-family | Font |
| $zeroOneColor_1 | Dark text and backgrounds, navigation, back-to-top button, buttons, text color on gradient background, footer, form labels |
| $zeroOneColor_2 | Dark primary color, gradient background right, button and link hover |
| $zeroOneColor_3 | Light primary color, gradient background left, active tab, hover on social icons, events in the calendar |
| $zeroOneColor_4 | Headlines, dark primary color |
| $zeroOneColor_5 | Light text, buttons, navigation level 1, parallax element, back-to-top button, footer, forms |
| $body-bg | Background color of the page |
| $body-font-color | Text color |
| $link-color | Link color |
| $link-color-dark | Link color on hover |
| $boxes-background | Background color for boxes, news and event lists without images, calendar, forms, striped tables |
| $footer-background_1 | Background color of the upper footer area |
| $footer-color-1 | Text color of the upper footer area |
| $footer-background-2 | Background color of the lower footer area (copyright) |
| $footer-color-2 | Text color of the lower footer area (copyright) |
| $border-radius | Rounded corners for buttons, forms, navigation etc. - possible values e.g. 10px, 100% or 0px (no rounded corners). |
| $mobile-navbar-breakpoint | Breakpoint at which the mobile navigation with the burger icon is shown - default: 960px |
To include a font, add CSS code like the following at the very beginning of _custom_variables.scss. Replace the name and the paths of the font. The path must always start with /.
@font-face {
font-family: "Beispiel-Font";
font-style: normal;
font-weight: normal;
src: url("/files/zeroOne/fonts/font.woff"),
url("/files/zeroOne/fonts/font.ttf"),
url("/files/zeroOne/fonts/font.svg");
}_custom_variables.scss defines a variable for the font ($body-font-family). Uncomment the line (remove the slashes) and add the name of the font at the beginning.
$body-font-family: 'Beispiel-Font', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto;You can add the following line to templates so that the SCSS is only loaded on pages where this template is used. Always use the full path starting from files.
<?php $GLOBALS['CUSTOM_STYLES'][] = 'files/zeroOne/scss/ce_text' ?>With ZERO_ONE_STYLES you can load SCSS files from the theme or the Spectre framework. The path always starts at the folder
bundles/contaothemesnetzeroonetheme/scss.
<?php $GLOBALS['ZERO_ONE_STYLES'][] = '_buttons'; ?>This feature is only available from 0.1 theme version 2.1.0 (Contao 5) or 1.11.0 (Contao 4).
You can change the background and text color of an article with classes.
The following classes are available for the background:
bg-zeroone-2 (Primary Color Dark)bg-zeroone-3 (Primary Color Light)bg-zeroone-4 (Primary Color Darken)bg-darkbg-graybg-lightbg-successbg-warningbg-errorThe following classes are available for the text color:
text-primarytext-secondarytext-darktext-graytext-lighttext-successtext-warningtext-errorMore information: Spectre documentation
Adding the classes in the article settings:
This is what it would look like in the front end:
The following pages explain each element of the 0.1 theme and describe how exactly you can use it.
For the accordion, simply select the content element template ce_accordionSingle_zeroone or ce_accordionStart_zeroone for the single element or the accordion start element.
The accordion is based on the Spectre accordion and works entirely without JavaScript, so the j_accordion template does not need to be included in the page layout.
To place a button, follow these steps:
ce_hyperlink_button_zeroone (template settings)content_element/hyperlink/button_zeroone (template settings)In the tab Advanced CSS classes, under Button style (in classes for content elements), you can assign more classes to change the look of the button: .btn-primary, .btn-link, .btn-success, .btn-error.
Under button size you can change the size of the button: .btn-sm (small), .btn-lg (large).
With button full width the button spans the entire available width: .btn-block.
This feature is only available from 0.1 theme version 1.5.0.
The carousel is based on the Spectre carousel and works entirely without JavaScript.
First you need an element of type Wrapper start (content slider) and Wrapper end. Select the template ce_sliderStart_carousel or ce_sliderStop_carousel for the content elements. The js_slider template does not need to be activated in the layout.
Wrapper start
Wrapper stop
Inside the wrapper elements, place an element of type Teaserbox (under Contao Themes). Assign the template ce_cthemes_teaserbox_carousel to the content element. You can choose a headline, a text, a link and an image. For the image, select the image size Carousel to get the right size.
In the end, the structure of the elements should look like this:
By adding more classes you can change the text color and the look of the button. You make these settings in the Teaserbox element under Advanced CSS classes (at the very end).
To show the button with a black background and white text, select the class .btn-primary under button style.
This feature is only available from 0.1 theme version 2.1.0 (Contao 5) or 1.11.0 (Contao 4).
Add the class fade to the element of type Wrapper start (content slider) to change the slide effect to a
fade effect.
This feature is only available from 0.1 theme version 1.5.0.
Place an element of type Content Box (under Contao Themes) and select the template ce_cthemes_contentbox_zeroone. With the grid you can show several elements side by side.
By adding more classes you can change the text color, background and the look of the buttons. You make these settings in the content element under Advanced CSS classes (at the very end).
To show the button with a black background and white text, select the class .btn-primary under button style.
You can also add the classes bg-zeroone-2, bg-zeroone-3 or bg-zeroone-4 under expert settings
to show the content box in one of the primary colors.
The theme is based on Spectre CSS, which among other things lets you show elements side by side and, at the same time, in a single column on mobile devices.
To show two text elements side by side, for example, first add one element of type Contao Themes (content container start) and one of type Contao Themes (content container end).
The element of type Content container start needs the col attribute .columns under Advanced CSS classes.
Between the wrapper elements, place the elements you want to show side by side. Select the col attribute .column under advanced CSS classes.
You can also define more classes, e.g. column widths for certain resolutions or column gaps. You find more information in the Spectre documentation under Flexbox grid and Responsive.
primary-color-dark: headline in the dark primary colorprimary-color-light: headline in the light primary colorheadline-35: headline is always 35pxUnder advanced CSS classes, in text alignment (under classes for content elements), you can change the alignment of the headline. You can select the following classes:
text-left: left-alignedtext-center: centeredtext-right: right-alignedtext-justify: justifiedce_headline_zeroone (up to Contao 4.13) or content_element/headline/dotted_zeroone
(Contao 5.0 and later)headline-dotted (second input field)The headline would then look like this:
ce_download_zeroone or ce_downloads_zeroone (template settings)content_element/download/download_zeroone or content_element/downloads/downloads_zeroone (template settings)ce_gallery_zeroone (template settings)content_element/gallery/gallery_zeroone (template settings)ce_youtube_zeroone (template settings)content_element/youtube/youtube_zeroone (template settings)For a parallax element, create a new article, edit the article settings and enter the following CSS classes
under expert settings (second input field): hero parallax fullwidth.
In the article, place a text element and add, for example, a headline and a text. Under image settings you select the image.
Under Template settings, select the template ce_text_hero_parallax_zeroone (up to Contao 4.13)
or content_element/text/parallax_zeroone (Contao 5.0 and later).
This is what the finished parallax element should look like:
This feature is only available from 0.1 theme version 1.5.0.
Place an element of type Price table (under Contao Themes) and select the template ce_cthemes_pricebox_zeroone.
With the grid you can show several elements side by side. If the price boxes should have no spacing to the left and right, select .col-gapless (in more classes for columns) under Advanced CSS classes in the content container start.
By adding more classes you can change the text color, background, text alignment and the look of the buttons. You make these settings in the content element under Advanced CSS classes (at the very end).
To show the button with a black background and white text, select the class .btn-primary under button style.
To center the content, select .text-center under text alignment.
You can also add the classes bg-zeroone-2, bg-zeroone-3 or bg-zeroone-4 under expert settings
to show the price box in one of the primary colors.
For a quote element, create a new article, edit the article settings and enter the following CSS classes
under expert settings (second input field): hero quote text-center.
In the article, place a text element and add a headline.
You don’t need to fill in the text field, as it is not output. As it is a mandatory field, it is enough to add, for example, just an empty line.
Under Image settings you select the image shown in the background.
Under advanced CSS classes, make the following settings:
.column under Add col attribute.col-mx-auto under OffsetThis is what the finished quote element should look like:
The sticky teaser box element is based on the NATURE theme element and is not a feature of the 0.1 theme, but you can build it yourself with template, SCSS and JavaScript adjustments.
Create a new template under Templates and select ce_cthemes_teaserbox.html5. It is best to rename the template, e.g. to ce_cthemes_teaserbox_sticky.html5.
Replace the template content with the following code:
<div class="<?= $this->class ?> block sticky-teaserbox full-height"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>
<div class="inside">
<?php $this->block('content'); ?>
<?php if ($this->addImage): ?>
<figure class="image_container float_above" style="background-image:url('<?= $this->picture['img']['src'] ?>')"></figure>
<?php endif; ?>
<div class="content">
<?php if ($this->headline): ?>
<<?= $this->hl ?>>
<?php if($this->page != ""): ?><a href="<?= $this->page ?>"<?= $this->target ?><?= $this->rel ?><?= $this->pageTitle ?>><?php endif; ?>
<?= $this->headline ?>
<?php if($this->page != ""): ?></a><?php endif; ?>
</<?= $this->hl ?>>
<?php endif; ?>
<?= $this->text ?>
<?php if($this->page != ""): ?>
<div class="pageLink">
<a href="<?= $this->page ?>"<?= $this->target ?><?= $this->rel ?><?= $this->pageTitle ?>><?= $this->pageText ?></a>
</div>
<?php endif; ?>
</div>
<?php $this->endblock(); ?>
</div>
</div>Now place elements of type Teaser Box (under Contao Themes) and select the template you just created.
Go to the file manager, edit custom.scss in zeroOne/scss and add the following SCSS code. You may have to reload the page with Ctrl + F5 or clear the script cache for the changes to take effect.
.ce_ct_teaserBox.sticky-teaserbox {
padding: 0;
.content {
width: 50%;
margin-left: 50%;
padding: 80px 200px 80px 80px;
}
.image_container {
display: none;
width: 50%;
background-size: cover;
height: 100%;
background-position: center;
position: absolute;
}
.inside {
height: 100vh;
align-items: center;
h1, h2, h3, h4, h5, h6 {
width: 100%;
text-align: left;
padding: 0;
}
.pageLink {
width: 100%;
}
}
p {
font-size: 18px;
}
.pageLink a {
@extend .btn;
}
}
.sticky-container {
position: relative;
.sticky-column {
position: absolute;
width: 50%;
height: 100%;
padding-top: 0;
content: "";
left: 0;
top: 0;
.sticky-column-background {
background: center center/cover no-repeat;
background-image: inherit;
position: -webkit-sticky;
position: sticky;
top: 0;
width: 100%;
height: 100vh;
z-index: 10;
@for $i from 1 through 20 {
&:nth-of-type(#{$i}) {
z-index: #{$i};
}
}
}
}
}
@media (max-width: 1280px) {
.ce_ct_teaserBox.sticky-teaserbox .content {
padding: 20px 80px;
}
}
@media (max-width: 960px) {
.ce_ct_teaserBox.sticky-teaserbox {
.content {
padding: 20px 40px;
}
p {
font-size: 16px;
}
}
}
@media (max-width: 600px) {
.sticky-container .sticky-column {
display: none;
}
.ce_ct_teaserBox.sticky-teaserbox {
.content {
width: 100%;
margin: 0;
padding: 20px;
}
.image_container {
display: block;
width: 100%;
position: relative;
height: 300px;
}
.inside {
height: inherit;
}
}
}Add the following JavaScript in the layout under Custom JavaScript code. jQuery must also be loaded under jQuery.
Alternatively, you can create a JavaScript file and include it in the layout.
<script>
jQuery(document).ready(function($) {
if( $(".sticky-teaserbox").length > 0 ) {
$(".sticky-teaserbox").closest(".mod_article").removeClass("block");
$(".sticky-teaserbox").closest(".mod_article").addClass("sticky-container");
$("<div class='sticky-column'></div>").insertBefore(".sticky-teaserbox:nth-of-type(1)");
}
$(".sticky-teaserbox").each( function() {
var style = $(this).find(".inside > .image_container").attr("style").replace(/\"/g, "'"); // replace for ie11
$(".sticky-column").append('<div class="sticky-column-background" style="'+style+'"></div>');
});
})
</script>To place a table, follow these steps:
ce_table_zeroone (template settings)content_element/table/table_zeroone (template settings)Under Expert settings you can define more CSS classes in the second input field to change the look of the table:
table-striped: striped tabletable-hover: hover effecttable-scroll: scrollable tableFor a tabs element, first place one element of type Content container start and one of type Content container end.
In the element Content container start, enter the class tabs in the second input field under Expert settings.
Then place an element of type Tabs navigation inside the content containers.
In the Tabs navigation element you define the individual tabs under Tabs settings. Always enter a unique value and a label.
After the tabs navigation element, add one element of type Tabs wrapper (start) and one of type Tabs wrapper (stop).
Inside the tab wrapper elements, add the content as text elements. Under Expert settings, enter the respective value from the tabs navigation element as the CSS class.
This is what it should look like in the end:
To place a teaser box, follow these steps:
ce_cthemes_teaserbox_zeroone (template settings)By default the teaser box is then shown as in the following screenshot:
You can also add an image by ticking Add an image under Image settings. Under Image alignment you choose whether the image is aligned left or right.
A teaser box with an image is then shown as in the following screenshots.
The following pages explain each module of the 0.1 theme and describe how exactly you can use it.
Follow these steps to place a calendar:
cal_default (normal calendar)cal_mini (mini calendar)mod_calendar_zeroone (template settings)Follow these steps to place an event list:
event_teaser_zeroone (event list with images)event_list_zeroone (event list without images)event_upcoming (simple event list with date and title only)mod_eventlist_zeroone (template settings)Follow these steps to place the event reader (detail view):
event_full_zeroone (template settings)When you create a form, select the form template form_wrapper_zeroone in the form settings under
Template settings.
The 0.1 theme also includes more templates for form fields, which you select in the respective elements under template settings if the fields should look like in the theme demo.
Checkbox menu:
form_checkbox_zeroone: stackedform_checkbox_inline_zeroone: side by sideRadio button menu:
form_radio_zeroone: stackedform_radio_inline_zeroone: side by sideSubmit field:
form_submit_zerooneSelect mod_login_zeroone under template settings so that the login form is already styled to match the theme.
To show the form with placeholders only, select the template mod_login_placeholder_zeroone.
Select mod_changePassword_zeroone under template settings so that the module is already styled to match the theme.
Select mod_lostPassword_zeroone under template settings so that the module is already styled to match the theme.
Select member_zeroone or member_grouped_zeroone under template settings so that the registration form is already styled to match the theme.
Select member_zeroone or member_grouped_zeroone under template settings so that the personal data form is already styled to match the theme.
To show form fields in a simple form or registration form with placeholders only and without labels, you have to override the templates. In the left navigation, select Templates under Layout and duplicate the corresponding template with the button New template.
Text field:
form_textfield.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->hideInput): ?> password<?php endif; ?><?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" value="<?= Contao\StringUtil::specialchars($this->value) ?>"<?= $this->getAttributes() ?><?php if ($this->label): ?> placeholder="<?= $this->label ?><?php if ($this->mandatory): ?> *<?php endif; ?>"<?php endif; ?>>
<?php $this->endblock(); ?>Select field:
form_select.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<?php if ($this->multiple): ?>
<input type="hidden" name="<?= '[]' == substr($this->name, -2) ? substr($this->name, 0, -2) : $this->name ?>" value="">
<?php endif; ?>
<select name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="<?= $this->class ?>"<?= $this->getAttributes() ?>>
<?php foreach ($this->getOptions() as $option): ?>
<?php if ('group_start' == $option['type']): ?>
<optgroup label="<?= $option['label'] ?>">
<?php endif; ?>
<?php if ('option' == $option['type']): ?>
<?php if($option['value'] == '') $option['label'] = $this->label; ?>
<option value="<?= $option['value'] ?>"<?= $option['selected'] ?>><?= $option['label'] ?></option>
<?php endif; ?>
<?php if ('group_end' == $option['type']): ?>
</optgroup>
<?php endif; ?>
<?php endforeach; ?>
</select>
<?php $this->endblock(); ?>Password field:
form_password.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<input type="password" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text password<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" value="" autocomplete="new-password"<?= $this->getAttributes() ?><?php if ($this->label): ?> placeholder="<?= $this->label ?><?php if ($this->mandatory): ?> *<?php endif; ?>"<?php endif; ?>>
<?php $this->endblock(); ?>Textarea:
form_textarea.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<textarea placeholder="<?= $this->label ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="textarea<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" rows="<?= $this->rows ?>" cols="<?= $this->cols ?>"<?= $this->getAttributes() ?>><?= $this->value ?></textarea>
<?php $this->endblock(); ?>In the 0.1 theme, the mega menu is available from version 1.13.0 (for Contao 4) or 2.3.0 (Contao 5).
You find an example of what it looks like on a finished website in our theme demo.
If you have a new Contao installation and have already imported the current theme demo, you can activate the mega menu simply by changing the page layout in the page settings.
If you can’t select it in your Contao installation yet, edit the navigation module and switch the module template and the navigation template to the templates with the suffix megamenu.
You can also add an image for each menu item, which is shown in the mega menu.
Follow these steps to place a news list:
news_latest_zeroone (news list with images)news_short_zeroone (news list without images)news_simple (simple news list with date/author and title only)mod_newslist_zeroone (template settings)Follow these steps to place the news reader (detail view):
news_full_zeroone (template settings)Follow these steps to place a newsletter:
nl_default_zeroone (template settings)Follow these steps to place a search engine:
mod_search_zeroone (template settings)You can update the theme with the Contao Manager. Then open the install tool and update the database.
If a problem occurs after the update, have a look at our solutions.
A database backup beforehand never hurts!
If you ran into problems during installation or setup, or if you found a display issue of the theme in a specific browser, please open a new ticket:
Please check first whether your bug is already known.
Host: Mittwald
Solution: Switch your PHP version from FPM to CGI (under Tools > Software manager > Script languages).
Check in _custom_variables.scss (in the file manager under zeroOne/scss) whether the variable $scssPath exists and how the color schemes are included.
If the variable $scssPath exists in _custom_variables.scss, remove it.
//@import 'colour_schemes/earth';
//@import 'colour_schemes/night';
@import 'colour_schemes/dark_mode';
/*
* Kommentieren Sie die folgende Zeile aus, wenn die Bilder nicht dem ent-
* sprechenden Farbschema angepasst werden sollen.
*
* Uncomment the following line if the images should not be adjusted to the
* colour scheme.
*/
@import 'colour_schemes/adjust_images';Check in _custom_variables.scss (in the file manager under zeroOne/scss) whether the variable $scssPath exists and how the color schemes are included.
If the variable $scssPath doesn’t exist in _custom_variables.scss yet, add it before the import statements.
$scssPath: "../../../vendor/contao-themes-net/zero-one-theme-bundle/src/Resources/public/scss";The lines under Colour Schemes should look like the following code example. It is important that #{$scssPath} is at the
beginning.
//@import '#{$scssPath}/colour_schemes/earth';
//@import '#{$scssPath}/colour_schemes/night';
@import '#{$scssPath}/colour_schemes/dark_mode';
/*
* Kommentieren Sie die folgende Zeile aus, wenn die Bilder nicht dem ent-
* sprechenden Farbschema angepasst werden sollen.
*
* Uncomment the following line if the images should not be adjusted to the
* colour scheme.
*/
@import '#{$scssPath}/colour_schemes/adjust_images';Creuva – create something new. Creuva is a flexible theme for Contao 5.7 and Contao 6 based on the Theme Components Bundle. A single command sets up the theme, page layout, modules and website root, optionally with basic pages or a complete demo website.
Quick start
The theme documentation covers these topics:
| Contao 5.7 | Contao 6 | |
|---|---|---|
| PHP | 8.3 or higher | 8.4 or higher |
| Page layout | Type “Modern” | Type “Modern” |
The Contao Manager or Composer installs these extensions automatically:
Creuva styles the modules for news, events, FAQ, newsletter, comments and listing, but they are optional. The demos only create news and events if the respective bundle is installed.
You can set up Creuva in an empty or in an existing installation. Existing content is kept, the theme comes with its own page layout.
The demo files (icons, PDFs) are served via the symlink public/files/creuva-demo. On Windows,
contao:symlinks needs administrator rights or developer mode for this, otherwise icons and downloads are missing.
You can get a license for Creuva at contao-themes.net. A license is valid for one domain including subdomains; for multiple websites you need several single licenses or a license for unlimited domains. You may use the theme for private and commercial projects.
The bottom bar in the footer always contains the link “powered by contao-themes.net”. It is part of the license and may only be removed or changed with a license without copyright link – even if you only use the theme as a base and customize it.
Texts, images and other media in the demos are for preview purposes only and must not be used for your own
websites. The bundled fonts (Plus Jakarta Sans and Fraunces under the SIL Open
Font License 1.1) and the required packages are subject to their own licenses; you can find an overview in the
bundle’s THIRD-PARTY-NOTICES.md file.
You can find the full license terms in the LICENSE file in the bundle.
Installation takes two steps: install the package, then set up the theme. You can do the setup in the back end
under Layout › Creuva or on the console with creuva:install – both lead to the same result.
Open the Contao Manager (www.your-domain.com/contao-manager.phar.php), search for creuva in the Discover tab, add the package pdir/creuva-theme-bundle and click Apply changes. Then update the database when the Contao Manager prompts you to.
Log in to the back end as an administrator and open Layout › Creuva. Under Set up you choose what should be created:
| Option | Result |
|---|---|
| Import a demo website | New website root with all pages, content, news, images and forms of a demo |
| Create an empty site structure | New website root with start, contact, imprint, privacy, accessibility statement, sitemap and search pages |
| Use an existing website | The Creuva layout is assigned to the selected website roots, the content stays unchanged |
| Only create the theme | Create the theme, modules and page layout; you assign the layout yourself later |
For a new website root you enter the title, language and optionally the domain. You need the domain if there already is a website root with the same language and no domain. Below each form you find the matching console command and, after running it, the output.
If the page reports that the database is not up to date, update it first in the Contao Manager or with
contao:migrate.
page/layout/creuva, with all modules assigned to their
slotsThe theme detects the contact, imprint, privacy, accessibility, sitemap and search pages of an existing website by
their alias (kontakt, impressum, datenschutz, barrierefreiheit, sitemap, suche …) and links them in the
header button, the header search and the footer. Module names and texts follow the language of the website root
(German or English).
| Option | Description |
|---|---|
--root=<ID> | Website root that receives the Creuva layout (can be used multiple times) |
--with-pages | Create a new website root with basic pages (automatic if there is none yet) |
--demo[=<name>] | Create a new website root with a demo: standard (default), unternehmen, portfolio, sportverein or a folder such as files/my-demo |
--site-title, --language, --dns | Title, language (default de) and domain of the new website root |
--scheme | Color scheme, e.g. green (default), petrol, blue – see Color schemes |
--variant | Color mode: light (default), dark, auto (follows the system setting) |
--typography | modern (default, Plus Jakarta Sans) or editorial (headings in Fraunces) |
--theme-name | Name of the theme (default “Creuva”), e.g. for a second variant |
--replace | Delete the website with the same domain and language, including its theme, beforehand, see Reset content |
--reset | Delete all Contao content beforehand |
--force, --no-backup | With --reset/--replace: without confirmation or without a database backup |
Error message: 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.
Demo icons and downloads are missing
Run vendor/bin/contao-console contao:symlinks so that public/files/creuva-demo is created.
Search finds nothing
Build the search index once after the setup: System › Maintenance or contao:crawl.
creuva:install or Layout › Creuva takes care of these steps for you. If you prefer to put the theme
together yourself, proceed as follows:
Create a new theme under Layout › Themes and add these modules to it:
Create a page layout of type “Modern” with the template page/layout/creuva and assign the modules to the
slots:
| Slot | Content |
|---|---|
top | optional bar, style switcher |
header | Creuva header |
main | articles |
prefooter | optional, e.g. a logo bar above the footer |
footer | Creuva brand and footer navigations |
bottom | copyright, sitemap, cookie settings |
The bottom bar always contains the link “powered by contao-themes.net”, see License.
In the page layout, set the color scheme, color mode, typography, corner radius and animations under Creuva design, see Design.
To make the Creuva classes available as select fields:
h2.name, email, tel,
organization).The installer and the demos already do this.
Creuva comes with four demos. Each one is imported as a website root of its own – in the back end under
Layout › Creuva › Set up (option “Import a demo website”) or on the console. In an existing installation, you
add the demo alongside with its own domain (--dns) or language (--language).
| Demo | Command | For | Live |
|---|---|---|---|
| Standard / Creative | creuva:install --demo | Agencies, freelancers, small businesses | View |
| Company | creuva:install --demo=unternehmen | Mid-sized companies, industry, trades | View |
| Portfolio / Studio | creuva:install --demo=portfolio | Photographers, architects, creative studios | View |
| Sports club | creuva:install --demo=sportverein | Football and sports clubs, associations | View |
All demos use only core elements, Creuva elements and template variants, so they work the same in Contao 5.7 and 6. The elements are independent of the demos: whatever a demo shows, you can use on any Creuva website.
The texts, images and media of the demos are for preview purposes only and must not be used on your own websites. The contact form does not send any emails – add the sending in the form generator.
files/creuva-demo/standard/ (illustrations, icons, PDFs) with alt textsA classic company website (“Kessler Metalltechnik GmbH”, Light, color scheme Ocean, square corners):
news_creuva_job
(see News)For photographers, architects and creative studios (“Studio Lichtung”, typography Editorial, color scheme Terracotta, small corners):
creuva_tile), logo bar and the grid class “Versetzt” (offset, u-grid-offset)For football and sports clubs (“TSV Rotenbach 1921”, Light, color scheme Red, medium corners, crest as logo):
u-table-league)The styleguide shows all elements, template variants, CSS classes and modules of the theme on one page: colors, typography, buttons, lists, tables, media, key figures, accordion, backgrounds, animations, all form fields, breadcrumb and news list. It is independent of the demos and can be added to any Creuva website – under Layout › Creuva › Styleguide or on the console:
styleguide) at the end of the website, not in the navigation, not in the search
index and with noindex,nofollowfiles/creuva-demo/styleguide/The demos install the styleguide as well.
Every demo comes with the page zugaenglichkeitserklaerung, linked in the footer. Each section is a text element
of its own; sections that don’t fit every website (PDF documents, videos, maps, third parties, BFSG, dispute
resolution …) are hidden and can be shown via the eye icon. --with-pages creates the page with a placeholder.
The text is a template. The theme alone does not make a website accessible; the date and details must match the website in question.
You can export a website as a template and import it into another installation – e.g. as a starter package for
client projects. The template is a folder with a demo.yaml and the files used, the same structure as the bundled
demos.
In the back end under Layout › Creuva › Export a website (administrators only), you choose the website root and optionally a title and folder name. Below, all exports are listed with date, number of files and size; you can download them as a ZIP and delete them. On the console:
var/exports/kunde-x/
├── demo.yaml pages, contents, modules, forms, news, events, image sizes, design
└── files/ the files usedThe export includes:
Not exported are custom colors of the layout, recipient addresses of forms, tables of other extensions and the
styleguide page (it is recreated on import). Insert tags with IDs such as {{insert_module::3}} and the elements
“Content element” and “Article” (aliases) cannot be transferred; the export lists them as warnings. Page links such
as {{link_url::12}} are converted to aliases.
To move a complete website, a database backup is the better way. The export is meant for templates.
files/<name>. Do not make the folder public, otherwise the
demo.yaml can be accessed on the web.files/<name> in “Or own folder”, or:The files are copied to files/creuva-demo/local-<folder name>/, the source folder stays unchanged. With
filesFolder: inhalte in the demo.yaml, they end up in files/inhalte/ instead; this folder is not deleted by
creuva:reset.
The definition is YAML. You write references as page:<alias>, module:<key>, image_size:<key>,
news_archive:<key>, calendar:<key> or file:<path>. An example with the most important sections:
You define events under events:; the date is a strtotime() expression ("2026-12-05", "5 December"),
relative values such as 'date:next saturday 15:00' are possible as well. The bundled demos in the bundle’s
demo/ folder are the best template.
Each image size is meant for one spot in the layout, so the browser doesn’t load more than necessary:
| Key | Name | For |
|---|---|---|
logo | Logo | Logo in header and footer |
hero | Hero | Image in the hero element |
cover | Vollbild (16:9) | Full-width hero |
card | Karte (4:3) | Cards in three or four columns, slider with several cards |
media | Bild & Text (4:3) | Template variant “Image & text”, cards in two columns |
wide | Breit | Image across the content width |
tile-portrait, tile-landscape | Kachel hoch/quer | Image tiles |
slider | Slider (3:2) | Images in a slider across the content width |
team, avatar | Team, Avatar | Portrait and testimonial |
news, news-detail | News-Teaser, News-Detail | News list and header of the news reader |
gallery | Galerie (responsiv) | Galleries, the gallery template sets sizes per image |
The demo import does not overwrite any existing contents. To import a demo again or to put an installation back into the state right after a fresh install, there are two ways.
Both commands delete contents. A database backup is created automatically beforehand – only turn it off if you are sure.
creuva:reset)In the back end, this corresponds to the option “Delete all contents first” under Layout › Creuva › Set up.
files/creuva-demo is deleted.var/backups/creuva-reset__<timestamp>.sql.gz; restore it with
contao:backup:restore <file name>.--force, without backup: --no-backup.--replace)--reset deletes all websites. If several websites run in one installation, --replace only replaces the
website that the import would create:
This deletes the website roots with the same domain and language including their subpages and contents, the theme
with the name from --theme-name and the themes whose layouts this website uses, as well as forms, news archives
and calendars – but only if no other website uses them.
--replace simply creates it.--reset and --root; requires --demo or --with-pages.Afterwards, rebuild the search index with contao:crawl.
You set up the look in the page layout under Creuva design. Below the fields, a live preview shows a heading, buttons and boxes with the current selection.
| Field | Options |
|---|---|
| Color scheme | 17 schemes, see below |
| Color mode | Light / Minimal, Dark / Creative, Light or dark by system setting |
| Typography | Modern (Plus Jakarta Sans) or Editorial (headings in Fraunces) – can be combined with any color mode |
| Corner radius | Square, Small, Medium, Large – rounding of cards, buttons and images |
| Primary color, Accent color | optional custom colors as a hex value without #, they override the scheme |
| Logo height | Height of the logo in the header as a CSS value, e.g. 4rem (default 2.25rem); the header grows with it |
| Own stylesheets | CSS files from the file manager, see Custom CSS |
| Animations | All sections, CSS class only, None |
The live preview checks custom colors: it shows a notice if white text on the primary color, or the accent color as text on white, falls below a contrast ratio of 4.5:1. The accent color is also used for links and small text.
Each scheme consists of a primary color (buttons, dark areas, links; it also tints backgrounds, borders and text) and an accent color (accents, badges, icons, focus outlines). All schemes meet the WCAG contrast requirements (text 4.5:1, large text and graphics 3:1) in light and dark mode.
| Scheme | Key | Primary | Accent |
|---|---|---|---|
| Green (default) | green | #1d3b2a | #3c9a2f |
| Sage | sage | #2f3e36 | #52755f |
| Olive | olive | #2e3220 | #647219 |
| Graphite & lime | lime | #1c1f22 | #b5e61d |
| Petrol | petrol | #0f3a40 | #0b7d7d |
| Ocean | ocean | #0b2545 | #08759a |
| Blue | blue | #1b2f4b | #2f6fd6 |
| Indigo | indigo | #1a1b4b | #4f46e5 |
| Violet | violet | #2a1846 | #7c4dff |
| Plum | plum | #33152e | #9c3d8f |
| Magenta | magenta | #3d1430 | #c92a63 |
| Red | red | #3f1418 | #c8323a |
| Bordeaux | bordeaux | #3b0d1f | #a3214e |
| Terracotta | terracotta | #3b2219 | #b84f24 |
| Orange | orange | #2d1b0e | #f08c00 |
| Yellow | yellow | #26241c | #f2b705 |
| Midnight & gold | gold | #141a2e | #c9a227 |
You need the key for creuva:install --scheme=…, for the demo.yaml and for links to the
style switcher.
With “Light or dark by system setting”, the website appears light or dark depending on what the visitor has set in their operating system or browser, and switches along when the setting changes. A small script sets the mode before the first render, so the page doesn’t flash. Without JavaScript, it stays light.
In the website root, you can additionally set color scheme, color mode, typography and corner radius under “Creuva design”. These values take precedence over the page layout; a scheme in the website root also replaces the custom colors of the layout. This way, several websites can share one layout and still look different.
The installer and the demos leave the fields in the website root empty (“As in the page layout”), so changes in the page layout become visible right away.
| Setting | Effect |
|---|---|
| All sections (default) | All elements in the main section fade in from below on scroll, grids and news lists element by element, “Image & text” from both sides; key figures count up |
| CSS class only | Only elements with a class from “Animation” (see CSS classes) |
| None | No scroll animations, no intro animation in the hero, numbers appear immediately |
u-reveal-* classes set the direction per element and take precedence; u-reveal-none excludes an element
or a whole article.You can adjust duration, distance and delay with CSS:
Plus Jakarta Sans and Fraunces ship with the theme and are self-hosted, so there are no requests to Google. The browser only loads Fraunces if the typography “Editorial” is selected.
The front end module Creuva › Creuva style switcher shows a cog on the left edge. Visitors can use it to try out color scheme, color mode (Light, Dark, System), typography (Modern, Editorial) and corner radius live – ideal for a demo or for choosing a color scheme together with clients.
top section in the page layout, so the selection takes effect before the first render.The selection is only stored in the browser (localStorage) and applies to all pages with the module.
You can link to a combination directly, e.g.:
https://www.deine-domain.de/?scheme=red&theme=dark&typography=editorial&radius=none| Parameter | Values |
|---|---|
scheme | Key of the color scheme, e.g. petrol |
theme | light, dark, auto |
typography | modern, editorial |
radius | none, small, medium, large |
In the front end preview, the switcher additionally shows administrators the button “Save for the website”. It saves the selection in the website root of the current website, clears the page cache and then applies to all visitors. Editors without admin rights and regular visitors don’t see the button.
With the module option “Logged in back end users only”, the switcher is invisible to visitors. It only appears when you are logged in to the back end; a selection previously stored in the browser then no longer applies to visitors.
Set this option on live websites. Without it, every visitor sees the switcher.
Create a CSS file in the file manager, e.g. files/design/custom.css, and select it in the page layout under
Creuva design › Own stylesheets. It is loaded after the Creuva CSS, with its modification time for cache
busting. The folder must be public.
All Creuva styles live in CSS cascade layers (creuva.*). This means your own styles without a layer always take
precedence – without !important and without long selectors.
Colors, spacing and typography are CSS variables and are easy to override:
For custom primary and accent colors, the page layout is usually enough (see Design).
Give the accordion the class u-accordion-icon plus a class of your own, and set the icon with CSS:
All templates are Twig templates and can be overridden in the templates/ folder as usual, e.g.
templates/content_element/creuva_hero.html.twig:
Only the content is printed, black on white, without header, footer, breadcrumb, slider controls and backgrounds. Links in the text appear with their address, accordions are expanded, and cards and images are not split across pages.
Creuva comes with its own content elements and modules and styles the Contao core elements. The Styleguide shows how everything looks together.
| Element | Description |
|---|---|
| Creuva › Hero | Intro section with kicker, headline with highlighted part, text, two buttons, image and badge |
Logo bar (creuva_logos) | Client or partner logos; no background of its own, the section defines it |
Match (creuva_match) | Competition, home and away team with crests, kick-off, venue, optional result and button |
The hero image comes in several shapes:
The badge appears as a small card with check marks, one line per point. Image and text are optional.
You link the logos via the file metadata (“Link” field). In dark mode the logos sit on a light surface so that
dark and colored logos stay readable. The exceptions are the background „Primär (dunkel)“ (primary, dark) and the
class u-logos-original, both meant for white logos. The logo bar is also available as a module, e.g. for the
prefooter slot above the footer.
Without a result, the element shows the kick-off time (next match); with a result, it shows the final score. The
matching table class is „Liga-Tabelle“ (league table, u-table-league): a compact table with centered
numbers; your own team is highlighted if it is bold in the table.
| Module | Description |
|---|---|
| Creuva header | Logo, main navigation with dropdowns, CTA button, mobile menu and the optional search |
| Creuva brand | Logo, claim and social media links for the footer; the platform is detected from the URL |
| Logo bar | like the content element, for the slots of the page layout |
| Creuva style switcher | Try out color scheme, color mode, typography and corner radius, see Style switcher |
A full-width contact section below the footer columns is an HTML module with the class c-footer-contact in the
footer slot (see the standard demo for an example).
Creuva also styles:
Each entry is a card with a round plus/minus toggle. To add an icon in front of the question, set a class on the
accordion element: u-accordion-icon (question mark), u-accordion-info or u-accordion-chat. You can add an
icon of your own with CSS, see Custom CSS.
You can also select the background classes (u-bg-muted, u-bg-accent, u-bg-primary) on an article – the
article then becomes a full-width section with a background.
Every article has section spacing at the top and bottom. If two articles without a background or with the same background follow each other, the top spacing of the second one is dropped so it doesn’t double up. You can adjust individual articles in the CSS Style Selector under „Abstände“ (spacing).
You can choose these variants under Template settings › Custom template. All of them work independently of the demos; the Styleguide shows examples.
| Variant | Use |
|---|---|
creuva_card | Card with image, category (subline), title and text; the last link makes the whole card clickable |
creuva_feature | Icon box with a round icon (SVG or small image); on hover the card lifts and the icon is filled with the primary color |
creuva_cta | Call to action: a surface with kicker, two-tone headline and text on the left, the links in the last paragraph as buttons on the right (the first one filled, the others as outlines) |
creuva_media | Image & text: image left, right, above or below (image alignment), kicker, two-tone headline, text with a check list; links in the last paragraph become buttons |
creuva_testimonial | Testimonial: quote in the text, name as headline, role as subline, portrait as image |
creuva_team | Team member: portrait, name, role (subline), contact |
creuva_price | Price card: package as headline, price as subline, list of features, last link as button; highlighted with u-featured |
creuva_tile | Image tile: image in the proportions of its image size, the whole tile is clickable |
Icon box: In the CSS Style Selector under „Elementoptionen › Icon-Box“ (element options › icon box) you
find „Ohne Karte“ (without card, u-feature-plain, e.g. benefits in a row) and „Icon links, ohne Karte“ (icon on
the left, u-feature-inline, e.g. contact details).
Call to action: You choose the color under „Farben des Elements“ (element colors: white, gray, light
accent, accent color, outline; text and buttons adapt). „Call to Action › Zentriert“ (centered,
u-cta-stacked) puts the buttons below the text. To span the full window width, use „Breite › Volle Breite“
(width › full width, u-full-bleed) – then set „Innenabstand oben und unten: Kein“ (top and bottom padding: none)
on the article.
| Variant | Use |
|---|---|
creuva_stats | Key figures as cards: term = number, description = label |
creuva_timeline | Timeline: term = year/step, description = event; horizontal as soon as the element is wide enough, vertical in a grid column |
creuva_facts | Facts as a card, e.g. project data: term = label (“Client”), description = value |
creuva_steps | Process steps: numbered steps, side by side with a connecting line from tablet width up |
Key figures: Characters before or after the number ("+", “%”, “o’clock”) are highlighted, and the numbers count
up while you scroll. Ranges such as “11–20” don’t count up, and dates stay unchanged. Optionally, an icon sits
above each number (field Icons (key figures), in the order of the entries). With u-no-countup the numbers
don’t count up.
| Variant | Use |
|---|---|
creuva_slider | Gallery as a slider: Images per row sets how many images a slide shows (1–6; at most two on tablets, one on phones); Full-size view opens the lightbox |
You can find more about galleries under Sliders and galleries.
In boxes with u-bg-primary or u-bg-accent, a link that stands alone in the last paragraph is automatically
shown as a button. In texts with u-lead and in section headers it becomes an arrow link
(“View all services →”).
The Theme Components Bundle adds a subline to headlines. Creuva calls the field “Headline addition”:
Text elements and description lists also have the Kicker field: small uppercase text above the headline. Together with a two-tone headline you get the combination used on the demo home page (“CREATIVE PARTNERS ON EQUAL TERMS – More than just an agency.”).
Headline on the left, intro and link on the right: create an element group with the classes
u-grid-2 u-align-end, and inside it a headline element and a text element with the class u-lead whose last
paragraph contains only the link.
The text editor has a “Formats” menu with the theme’s text styles:
In the CSS Style Selector, „Primär-Button“ (primary), „Sekundär-Button“ (secondary), „Akzent-Button“ (accent) or „Outline“ turn a hyperlink element into a button. On a text element with this selection, the links in the last paragraph become buttons, side by side. In “Image & text” and in call-to-action boxes this happens automatically.
In the content slider element, every element inside is a slide: images, cards, testimonials, texts or whole element groups. Creuva adds the following to the slider settings:
Autoplay (delay), speed, start slide and loop are the Contao fields. Cards and boxes in a row have the same height.
You set the columns with Images per row (1–6), and Full-size view opens the lightbox. You can choose more layouts in the CSS Style Selector under „Galerie-Anordnung“ (gallery layout):
| Class | Layout |
|---|---|
u-gallery-mosaic | large image on the left, next to it one wide and two small ones, four images each |
u-gallery-mosaic-right | like the mosaic, large image on the right |
u-gallery-featured | first image across the full width |
u-gallery-masonry | images in their own height – choose an image size without cropping |
A gallery has only one image size for all images. So that every tile still loads a suitable image, the demos and
the Styleguide include the image size „Galerie (responsiv)“ (gallery, responsive; proportional, widths from
320 to 1600 px). The gallery template sets the right sizes value for every image, depending on the layout, the
position and “Images per row”. The important part set in the file manager stays visible in the tile.
For your own galleries, choose this image size or create one following the same principle – the widths are enough.
The format of an image is defined by the image size, not by the CSS. Gallery grids and gallery sliders need a size with fixed cropping for images of equal height (e.g. „Karte (4:3)“, card 4:3). Mosaic and „Erstes Bild groß“ (first image large) fill their tiles with any size, masonry needs a size without cropping.
With Full-size view/new window, images in the gallery and the image element open the Creuva lightbox: dark background, caption or title from the metadata, counter, previous/next, keyboard (Esc, arrow keys) and swiping on phones. The images of a gallery form a group. You don’t need any jQuery or MooTools templates in the page layout for this.
The first large image on a page (at least 400 px wide, in the first article, e.g. the hero image) is automatically prioritized and loaded without lazy loading. This improves the Largest Contentful Paint in PageSpeed. If a page starts with text, all images stay unchanged.
The news list shows the items as cards. With the class u-news-no-author on the module (news list, news reader or
news archive) you hide the author; the date stays.
The list template news_creuva_job shows news items as job ads: a card with title, tags and teaser. The tags
come from the subline, separated by “·”, e.g. “Full-time · Neuburg · starting now”. The “Company”
demo has an example.
The news reader shows a header like the hero: archive, date and reading time as the kicker, headline, subheadline as intro and author, next to it the news item’s image (image size in the News reader module). The content elements follow in the reading column.
Highlighted part: In the news item you find this field next to the headline. The text you enter appears in the accent color, e.g. “Accessibility becomes mandatory – what websites need now”. It must appear exactly like this in the headline. In lists, in the page title and in search engines the headline stays single-colored.
Reading time: The words of the content elements divided by 200 words per minute, rounded up, at least one minute. Headline, teaser and images don’t count.
Caption: Lists show no caption. The news reader only shows it if it is entered in the news item itself under Overwrite metadata; the caption from the file manager is not used.
The event list shows events with a date badge. The event reader, month and mini calendar and the event menu are styled as well. The “Sports club” demo uses events for the fixtures and results.
All Creuva classes are available as styles in the CSS Style Selector, in the CSS style section of content elements, articles and modules. So you don’t need to remember any class names – you just select them.
The classes are sorted into categories (e.g. „Abstände“, spacing) and, within them, into groups (e.g. „Innenabstand oben und unten“, top and bottom padding). Each group appears in the element as a select field with exactly one style. An element only shows the groups that fit its type – „Raster“ (grid), for example, only on element groups, „Buttons“ only on hyperlink and text elements.
Categories and groups are normal records. Under Layout › CSS styles you can change them, sort them by drag and drop and add your own categories and groups. Sections and element types always apply to the whole group.
The classes are imported
creuva:install,contao:migrate on existing websites, as long as no Creuva group exists yet,The import only adds what is missing. Your changes in the back end – titles, element types, removed styles, your own categories and groups – are kept.
The classes are still stored in the CSS class field, so the front end stays unchanged. After the update,
contao:migrate creates the Creuva groups and transfers the selection. You recreate your own Style Manager groups
as CSS styles. Afterwards you can delete the tables tl_style_manager_archive and tl_style_manager as well as
the styleManager columns.
The classes also work directly in the CSS class field, e.g. in places without a CSS style selection.
| Area | Classes |
|---|---|
| Background | u-bg-surface, u-bg-muted, u-bg-accent, u-bg-primary |
| Width | u-full-bleed (background across the full width), u-narrow |
| Frame | u-card, u-featured (highlighted price card) |
| Grid (element group) | u-grid-2, u-grid-3, u-grid-4; alignment u-align-start (don’t stretch columns), u-align-center, u-align-end; column width with two columns u-cols-wide-start, u-cols-wide-end (3 : 2) |
| Table | u-table-compare (package comparison: columns 2–4 colored, “✓”/"–" as icons), u-table-league (league table) |
| News | u-news-no-author (hide author) |
| Spacing | padding u-py-* (top and bottom), u-pt-* (top), u-pb-* (bottom); margin u-my-*, u-mt-*, u-mb-* – each 0, s, m, l, xl |
| Text | u-text-left, u-text-center, u-text-right, u-lead, u-muted, u-accent, u-kicker |
| Buttons | u-button (primary), u-button-secondary (white), u-button-accent, u-button-outline, u-button-outline-accent |
| Element colors | u-card-white, u-card-muted, u-card-soft, u-card-primary, u-card-accent, u-card-outline-primary, u-card-outline-accent, u-card-flat, u-card-none |
| Icon color | u-icon-soft (default), u-icon-accent, u-icon-primary, u-icon-white, u-icon-light, u-icon-plain, u-icon-original |
| Icon box | u-feature-plain (without card), u-feature-inline (icon on the left) |
| Call to action | u-cta-stacked (centered, buttons below the text) |
| Gallery | u-gallery-mosaic, u-gallery-mosaic-right, u-gallery-featured, u-gallery-masonry |
| Animation | u-reveal-up, u-reveal-left, u-reveal-right, u-reveal-down, u-reveal-zoom, u-reveal-blur, u-reveal-fade, u-reveal-none, u-reveal-stagger (content one after another), u-no-countup |
| Elements | u-accordion-icon, u-accordion-info, u-accordion-chat, u-media-plain (image & text without accent surface) |
| Visibility | u-hide-mobile, u-hide-desktop |
Cards, icon boxes, testimonials, price cards and the boxes of the Theme Components Bundle get a surface (white, gray, light accent, primary or accent color) or just a colored outline. On dark surfaces, text, links and kickers automatically switch to the contrast color.
You set the circle behind the icon of an icon box separately. With the primary and accent color the icon turns
white; this works with single-colored SVG icons. SVG icons are colored in the color scheme; with u-icon-original
they keep the colors of the file (e.g. multicolored icons). PNG and JPG images always keep their colors.
For key figures, the selection applies to each individual number. Without a selection they only have a light
surface on a dark background, and with u-card-none not even there.
Technically, the classes only set CSS variables (--card-bg, --card-border, --icon-bg …) that all cards read
– see Custom CSS.
The Creuva header can show a magnifying glass (field Search in the header, legend Search). It opens a search field above the page – also with Ctrl+K (⌘+K) or / – and sends the search terms to the selected search results page. Without the checkbox, no magnifying glass appears.
The results page holds the core module Website search. Creuva styles it with its own templates: a large search field, results as cards with the page path, highlighted search terms and an optional image, plus tips when nothing was found.
creuva:install --with-pages and the demos create the page „Suche“ (search; hidden, noindex, not in the
search index) and activate the search in the header. In a demo definition of your own,
header: { search: suche } (alias of the results page) is enough.
The page layout only adds the main section to the search index. Header, footer and copyright therefore don’t
show up in the search results.
Rebuild the search index once after an update: back end › System › Maintenance or
On all indexable pages, the Creuva layout outputs Open Graph tags and twitter:card: title, description,
address (as in the canonical link, without tracking parameters), language (og:locale, e.g. de_DE) and a
preview image of 1200 × 630 px.
For the preview image, the layout uses, in this order:
og:type “article” with
publication and modification datecreuvaOgImage)SVG files are skipped, WebP, AVIF and GIF are output as PNG, and JPEG stays JPEG. Smaller images are not upscaled.
Set a preview image for social networks in the website root. Then pages without an image also get a link preview.
Website roots created by creuva:install have the canonical tag enabled. On existing websites, you enable it in
the website root. The Styleguide is set to noindex,nofollow.
You update Creuva like any other Contao bundle, using the Contao Manager or Composer:
Then run the database migrations – in the Contao Manager via Update database or on the console:
The migrations apply changes to the page layout, CSS styles and settings. Your content and the design settings of the website root are kept.
Depending on the update, these steps may be useful:
| Step | Command |
|---|---|
| Add new CSS classes to the CSS Style Selector | vendor/bin/contao-console creuva:css-styles |
| Recreate the style guide with the new elements | vendor/bin/contao-console creuva:styleguide --root=1 --replace |
| Rebuild the search index | vendor/bin/contao-console contao:crawl |
creuva:css-styles only adds missing categories, groups and styles. Changes you made in the back end
are kept. The --root option specifies the ID of the website root that contains the style guide.
If you have overridden templates (see Custom CSS), compare them with the bundle’s templates after an update. Otherwise your copies will be missing new features.
You can find what changed in each version in the changelog on GitHub.
If you run into problems during installation or setup, or you notice a display error of the theme in a particular browser, please create a new ticket or write to us at support@pdir.dev.
Please check first whether your issue is already known.
The accessibility tools (contrast, font size) and the scroll animations of the Theme Components
Bundle use the generatePage and parseFrontendTemplate hooks. Contao does not run these for page layouts of type
“Modern”. The settings in the website root therefore have no effect in the Creuva layout.
Creuva comes with its own animations, see Animations.
The demo files (SVG icons, PDFs) are loaded directly from files/creuva-demo/ and need the symlink
public/files/creuva-demo (contao:symlinks). On Windows this fails without administrator rights or
developer mode.
For local development, a directory junction helps:
mklink /J public\files\creuva-demo files\creuva-democreuva:install --reset and contao:symlinks cannot handle an existing junction and abort.
Remove the junction beforehand with rmdir public\files\creuva-demo (this only deletes the link).
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.
Contao 4 requires a web server such as Apache or NGINX with PHP and MySQL support. Our theme requires Contao 4.4 or higher and PHP 7.1.
The theme can easily be installed via the Contao Manager. You find an installation guide here.
The 0.1 Isotope Bundle 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!
Install the 0.1 Isotope Bundle by editing the file composer.json in the Contao root directory. Add the following lines at the end of the file (as in the example composer.json below). Replace the domain and the password.
,
"repositories": [
{
"type": "composer",
"url": "https://[DOMAIN]:[PASSWORT]@packages.contao.store"
}
]Add the following line at the end of require. Don’t forget the comma in the second-to-last line.
"contao-themes-net/zero-one-isotope-bundle": "^1.0"Example of what composer.json should look like for Contao 4.13:
{
"type": "project",
"require": {
"contao/calendar-bundle": "^4.13",
"contao/comments-bundle": "^4.13",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "^4.13",
"contao/listing-bundle": "^4.13",
"contao/manager-bundle": "4.13.*",
"contao/news-bundle": "^4.13",
"contao/newsletter-bundle": "^4.13",
"contao-themes-net/zero-one-isotope-bundle": "^1.0"
},
"extra": {
"contao-component-dir": "assets"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
},
"repositories": [
{
"type": "composer",
"url": "https://BENUTZERNAME:PASSWORT@packages.contao.store"
}
]
}Now open the Contao Manager and run the update by clicking the button Apply changes at the bottom.
Then open the install tool and update the database. In the install tool you also have to create an admin user account.
You reach the install tool in the Contao Manager via the menu item Tools or via the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select the menu item 0.1 Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. This creates all files in the file manager under the folder zeroOne and copies the SQL files for the database import into the templates folder.
Select the menu item 0.1 Isotope Setup under CONTAO-THEMES-NET in the left navigation and click the button Synchronize files to create all product images and move the SQL files into the templates folder so that they can be imported.
Under the menu item 0.1 Theme Setup, 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.
In the install tool, import the template named 0.1_isotope_attributes.sql. Make sure to tick Do not truncate tables.
Then clear the cache.
When you open the install tool again now, some new fields should be created. Update the database.
Now import the template named 0.1_isotope_demo_contao_4.x.x.sql (depending on your Contao version) in the install tool. Make sure to tick Do not truncate tables.
For the import to work, Contao must be installed with the bundles for news, calendar, FAQ, newsletter, listing and comments.
If you don’t want to use these Contao bundles, you can uninstall them afterwards.
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.
Under Advanced CSS settings, select the class set spectre.json.
In addition, Use folder URLs must be active. You find it in the settings under Front end settings (up to Contao 4.10) or in the site structure in the settings of the website root under URL settings (Contao 4.11 and later).
Add the following line to custom.scss (file manager, under zeroOne/scss) so that the styling is loaded:
@import '../../../public/bundles/contaothemesnetzerooneisotope/scss/isotope';If your installation has a /web directory instead of /public, replace it in the path.
Also add the following line to activate the dark mode:
@import '../../../public/bundles/contaothemesnetzerooneisotope/scss/dark_mode';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 import statement.
If users should not only be able to order as guests but also register, install the extension terminal42/contao-autoregistration. In the settings of the website root under Member registration, activate the three checkboxes so that users are logged in and activated right after registering.
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.
You find the Isotope manual here: User manual (German)
You can update the theme easily via the Contao Manager. Then open the install tool and update the database.
If a problem occurs after the update, also have a look at our possible solutions.
A database backup beforehand never hurts!
If you ran into problems during installation or setup, or you found a display error of the theme in a particular browser, please create a new ticket at:
Please check beforehand whether your issue is already known.
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.
Contao 4 requires a web server such as Apache or NGINX with PHP and MySQL support. Our theme requires Contao 4.4 or higher and PHP version 5.6.
We recommend Contao 4.9 with PHP version 7.1 or higher to achieve the best possible loading time with our theme!
The theme is very easy to install with the Contao Manager. You find an installation guide here.
The CONVERT theme is available for free (with copyright notice) or with a paid license (without copyright notice).
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 invoice by email and we will activate your domain shortly, so that you can register it in the Contao back end.
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 should 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 convert in the field Theme Code. 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 03/01 Footer under Elemente - 03 Footer (at the very end) and edit it via the pencil icon.
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 CONVERT 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. The theme comes with 2 demo variants, each with its own website root.
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!
First open the Contao Manager at the following URL: www.your-domain.com/contao-manager.phar.php. Select Discover, enter CONVERT Theme in the search field and add the package CONVERT Theme.
Then switch to Packages, enter the version ^1.7 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 2.x, which is only compatible with Contao 5 and later.
Then open the install tool and update the database. You also have to create an admin user account in the install tool.
You can reach the install tool in the Contao Manager via the menu item Tools or at the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select the menu item CONVERT Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. This creates all files in the file manager under the folder convert 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.
Now open the install tool. Under the tab “Import a template” 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.
Besides the landing page demo, the CONVERT theme also comes with an
app demo (SQL files starting with convert_theme_contao_app_demo) with
different content.
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, a message should appear that a template was imported, as shown in the screenshot.
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.
Under Advanced CSS settings, select the class set spectre.json.
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)
You can edit the logo in the article under Elemente > 01 Header.
You can edit the footer content in the article under Elemente > 03 Footer.
Once the theme has been installed, the SCSS files are located in the file manager under the path convert/scss. For your own customizations, simply use custom.scss, which accepts both SCSS and plain CSS, and _custom_variables.scss.
In _custom_variables.scss you can change the colors and font of the theme. To change a variable, uncomment the line (remove the slashes).
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 convert 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 CONVERT theme comes with a light layout in orange colors. You can activate other color schemes, though:
To switch to another layout, uncomment (remove the slashes) the line with the desired color scheme in the Colour Schemes section of _custom_variables.scss. You may need to reload the page in the browser with Ctrl + F5 for the changes to take effect.
Activate the light color scheme - green/blue:
@import 'colour_schemes/green_blue';Activate the light color scheme - green/blue:
@import '#{$scssPath}/colour_schemes/green_blue';If the variable $scssPath does not exist in _custom_variables.scss yet, add it before the
import statements.$scssPath: "../../../vendor/contao-themes-net/convert-theme-bundle/src/Resources/public/scss";
To change colors and the font, uncomment the corresponding lines in _custom_variables.scss (remove the slashes).
| Variable | Meaning |
|---|---|
| $body-font-family | Font |
| $primary-color | Primary color |
| $dark-color | Dark shade (black) |
| $light-color | Light shade (white) |
| $body-bg | Page background color |
| $body-font-color | Font color |
| $link-color | Link color |
| $link-color-dark | Link color on hover |
| $footer-background_1 | Background color of the footer area |
| $footer-color-1 | Font color of the footer area |
| $border-radius | Rounded corners for buttons, teaser boxes etc. - possible values e.g. 10px, 100% or 0px (no rounded corners). |
| $article-width | Width of an article (default: 1180px) |
| $article-padding | Padding of an article (default: 60px 20px -> means: 60px top/bottom, 20px left/right) |
| $button-background | Button background |
| $button-color | Button font color |
| $button-background-hover | Button background on mouseover |
| $button-color-hover | Button font color on mouseover |
Since iOS 13/Android 10 you can activate dark mode, which switches the user interface to a black background and the text to a lighter color for better readability. If you activate dark mode, the CONVERT theme automatically switches to a darker color scheme. This is easier on your eyes at night and may slightly improve battery life.
You can also deactivate dark mode in _custom_variables.scss by commenting out the corresponding line (two slashes at the beginning of the line).
//@import 'colour_schemes/dark_mode';//@import '#{$scssPath}/colour_schemes/dark_mode';To add a font, insert CSS code like the following at the very beginning of _custom_variables.scss. Replace the name and the paths of the font. The path must always start with a /.
@font-face {
font-family: "Beispiel-Font";
font-style: normal;
font-weight: normal;
src: url("/files/convert/fonts/font.woff"),
url("/files/convert/fonts/font.ttf"),
url("/files/convert/fonts/font.svg");
}_custom_variables.scss defines a variable for the font ($body-font-family). Uncomment the line (remove the slashes) and add the name of the font at the beginning.
$body-font-family: 'Beispiel-Font', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto;You can easily update the theme with the Contao Manager. Then open the install tool and update the database.
If a problem occurs after the update, have a look at our possible solutions.
A database backup beforehand never hurts!
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.
In _custom_variables.scss (in the file manager under convert/scss), check whether the variable $scssPath exists and how the color schemes are included.
If the variable $scssPath exists in _custom_variables.scss, you have to remove it.
/* ============================= */
/* Colour Schemes */
/* ============================= */
//@import 'colour_schemes/dark';
//@import 'colour_schemes/green_blue';
/* ============================= */
/* Dark Mode */
/* ============================= */
@import 'colour_schemes/dark_mode';In _custom_variables.scss (in the file manager under convert/scss), check whether the variable $scssPath exists and how the color schemes are included.
If the variable $scssPath does not exist in _custom_variables.scss yet, you have to add it before the import statements.
$scssPath: "../../../vendor/contao-themes-net/convert-theme-bundle/src/Resources/public/scss";The lines under Colour Schemes should look like the following code example. It is important that #{$scssPath}
is at the beginning.
/* ============================= */
/* Colour Schemes */
/* ============================= */
//@import '#{$scssPath}/colour_schemes/dark';
//@import '#{$scssPath}/colour_schemes/green_blue';
/* ============================= */
/* Dark Mode */
/* ============================= */
@import '#{$scssPath}/colour_schemes/dark_mode';After an update from Contao 4 to 5, the error Unknown insert tag {{ua::browser|attr}} may appear in the system log. The insert tag is in the page layout under the expert settings
in the field Body class. As the insert tag no longer exists in Contao 5, you can remove it from the page layout.
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.
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.9 or higher.
Contao 4 requires a web server such as Apache or NGINX with PHP and MySQL support. Our theme requires Contao 4.9 or higher and PHP 7.1.
The theme can easily be installed via the Contao Manager. You find an installation guide here.
The MATE Isotope Bundle can only be installed into an empty Contao installation and is compatible with Contao 4.9 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!
Install the MATE Isotope Bundle by editing the file composer.json in the Contao root directory. Add the following lines at the end of the file (as in the example composer.json below). Replace the domain and the password.
,
"repositories": [
{
"type": "composer",
"url": "https://[DOMAIN]:[PASSWORT]@packages.contao.store"
}
]Add the following line at the end of require. Don’t forget the comma in the second-to-last line.
"contao-themes-net/mate-isotope-bundle": "^1.0"Example of what composer.json should look like for Contao 4.13:
{
"type": "project",
"require": {
"contao/calendar-bundle": "^4.13",
"contao/comments-bundle": "^4.13",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "^4.13",
"contao/listing-bundle": "^4.13",
"contao/manager-bundle": "4.13.*",
"contao/news-bundle": "^4.13",
"contao/newsletter-bundle": "^4.13",
"contao-themes-net/mate-isotope-bundle": "^1.0"
},
"extra": {
"contao-component-dir": "assets"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
},
"repositories": [
{
"type": "composer",
"url": "https://BENUTZERNAME:PASSWORT@packages.contao.store"
}
]
}Now open the Contao Manager, click Update for all existing packages (i.e. only Contao) and run the update by clicking the button Apply changes at the bottom.
Then open the install tool and update the database. In the install tool you also have to create an admin user account.
You reach the install tool in the Contao Manager via the menu item Tools or via the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select the menu item MATE Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. 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.
Select the menu item MATE Isotope Setup under CONTAO-THEMES-NET in the left navigation and click the button Synchronize files to create all product images and move the SQL files into the templates folder so that they can be imported.
Then empty the database table ’tl_files’ by clicking the button Empty table ’tl_files’ in the MATE Theme Setup.
Emptying the tl_files table deletes the image references. This is only necessary for the first installation of the theme.
In the install tool, import the template named mate_isotope_attributes.sql. Make sure to tick Do not truncate tables.
Then clear the cache.
When you open the install tool now, some new fields should be created. Update the database.
In the install tool, import the template named mate_isotope_demo_contao_4.x.x.sql (depending on your Contao version). Make sure to tick Do not truncate tables.
For the import to work, Contao must be installed with the bundles for news, calendar, FAQ, newsletter, listing and comments.
If you don’t want to use these Contao bundles, you can uninstall them afterwards.
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.
Under Advanced CSS settings, select the class set materialize.json.
In addition, Use folder URLs must be active. You find it in the settings under Front end settings (up to Contao 4.10) or in the site structure in the settings of the website root under URL settings (Contao 4.11 and later).
Add the following line to custom.scss (file manager, under mate/sass) so that the styling is loaded:
@import '../../../public/bundles/contaothemesnetmateisotope/scss/isotope';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 import statement.
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)
You find the Isotope manual here: User manual (German)
You can update the theme easily via the Contao Manager. Then open the install tool and update the database.
If a problem occurs after the update, also have a look at our possible solutions.
A database backup beforehand never hurts!
If you ran into problems during installation or setup, or you found a display error of the theme in a particular browser, please create a new ticket at:
Please check beforehand whether your issue is already known.
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 2.0.0 of the NATURE 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 NATURE theme is easy to install with the Contao Manager. You find a step-by-step installation guide here: NATURE theme installation.
The NATURE theme is available for free (with copyright notice) or with a paid license (without copyright notice).
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 invoice by email and we will activate your domain shortly, so that you can register it in the Contao back end.
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 nature 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 02/03 Copyright-Hinweis under Nature Theme Elemente - 02_Footer (at the very end) and edit it via the pencil icon.
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 NATURE 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.
Mittwald: some images are not displayed Solution: switch your PHP version from FPM to CGI (under Tools > Software manager > Script languages).
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!
First open the Contao Manager at the following URL: www.your-domain.com/contao-manager.phar.php. Select Discover, enter nature theme in the search field and add the package NATURE Theme.
Then switch to Packages, enter the version ^1.0 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 2.x, which is only compatible with Contao 5 and later.
Then open the install tool and update the database. You also have to create an admin user account in the install tool.
You can reach the install tool in the Contao Manager via the menu item Tools or at the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select the menu item Nature Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. This creates all files in the file manager under the folder naturetheme 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.
Now open the install tool. Under the tab “Import a template” 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 shown in the screenshot.
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 bulma.json.
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.
Mittwald: some images are not displayed Solution: switch your PHP version from FPM to CGI (under Tools > Software manager > Script languages).
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 customize the theme – e.g. colors, fonts, font sizes, header or footer – and how to add your own CSS is explained in the section Customizing the styling.
By default all pages under Modules, Layouts and Elements are configured so that they are neither indexed by search engines nor appear in the results of the Contao search. You can change this per page at any time – with the fields Robots tag (under Meta data) and Do not search (under Search settings).
For your own JavaScript, it is best to create a separate file and include it in the page layout. This keeps updates of the original theme easy and your customizations cleanly separated.
The page “Nature Theme Elemente” contains articles that you can include anywhere on your website with an insert tag. You find these articles by clicking Articles in the left menu and scrolling all the way down.
In the article settings of the article (via the wrench icon), select the matching Theme Helper Tag under Template settings. The field Page name lets you select a specific page – this is only necessary in a multi-domain installation.
You can then place the article with the following insert tag, e.g. in an HTML element or a template:
e.g. {{theme::content::NATURE01/01}}.
How to define your own Theme Helper Tags is explained in the Theme Helper documentation.
Under Themes → Page layouts there are four preconfigured layouts that you can assign to a page in the page settings under Layout settings:
There are also special layouts in which the logo and navigation are stacked. This feature is
available from NATURE theme version 1.7.0. To activate it, simply add the body class header-block-layout.
You can edit the logo in the article “01_Logo”, which you find under Nature Theme Elemente → 01_Header.
You edit the footer content in the articles under Nature Theme Elemente → 02_Footer.
The article “01_Logo” contains two logos: one for the light color scheme and one for the dark color scheme (dark mode). The second logo element gets the CSS class logo-light so that it is displayed correctly depending on the chosen color scheme or in dark mode.
After installing the theme, you find the SCSS files in the file manager under the path naturetheme/scss.
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 naturetheme 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 NATURE 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 and a blue 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 'color_schemes/nature_green_colors_contrast';
//@import 'color_schemes/nature_blue_colors_contrast';
//@import 'color_schemes/nature_red_colors_contrast';
//@import 'color_schemes/nature_dark_colors_contrast';
//@import 'color_schemes/nature_dark_green_colors_contrast';
//@import 'color_schemes/nature_dark_blue_colors_contrast';
//@import 'color_schemes/nature_dark_red_colors_contrast';
//@import 'color_schemes/nature_blue_colors';
//@import 'color_schemes/nature_red_colors';Modern operating systems and browsers support dark mode, which displays the user interface with dark backgrounds and lighter text colors – regardless of the device.
In the NATURE theme you activate dark mode by removing the comment characters (//) in front of the import line
in _custom_variables.scss (or _custom_colors.scss in older versions):
//@import 'color_schemes/nature_dark_mode';Important note
If you use the latest version of the NATURE theme, you may wonder where _custom_colors.scss has gone.
Don’t worry: as of NATURE version 2.5.0, a new installation of the NATURE 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 2.5.0 the NATURE theme was thoroughly adapted for accessibility and switched to Bulma 1.x. If you want to use all current and future features, you should switch to the new version. You find a detailed guide here: Update from V1 to V2.
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 naturetheme/scss/_custom_variables.scss.
✅ Example: activating a variable
// Vorher (nicht aktiv):
//--bulma-primary: #5ca152;
// Nachher (aktiv):
--bulma-primary: #5ca152;🧠 Important: two kinds of variables There are two basic kinds of variables, depending on where and how they are defined:
1. Global theme variables (:root) These variables apply site-wide and can be activated or adjusted directly in the :root block. They affect basic design values such as colors, font sizes or spacing.
Example:
:root {
--bulma-primary: #5ca152;
--bulma-font-size: 1.2rem;
}✅ These values are then available everywhere in the theme as var(--bulma-primary) etc.
2. Component-specific variables in CSS classes Some variables only take effect within certain CSS classes or components, e.g. .navbar, .button, .pagination etc. This is because Bulma uses its own class styles for these components, which you have to override specifically.
Example:
.navbar {
--bulma-navbar-background-color: #eaeaea;
}⚠️ These variables must be set inside the respective CSS class, otherwise they have no effect.
🔧 The most important CSS variables
Here is an overview of the most important CSS variables that you can adjust in
naturetheme/scss/_custom_variables.scss.
| Variable | Meaning |
|---|---|
--bulma-primary | Primary color of the theme |
--bulma-primary-invert | Contrast color to the primary color – e.g. for white text on a colored button |
--bulma-primary-bg-text | Text in the primary color – e.g. for links or headlines on a light background |
--bulma-text | Default text color |
--bulma-text-invert | Contrast color for text on a dark background (e.g. –bulma-black) |
--bulma-link | Link color |
--bulma-link-hover | Link color on hover |
--bulma-background | Page background color |
--bulma-boxes-background | Background color of boxes (e.g. teaser, contact, news, event, form, breadcrumbs) |
--bulma-boxes-color | Text color in boxes (e.g. teaser, contact, news, event, form, breadcrumbs) |
--bulma-info | Background color for info boxes (see text elements on the demo page) |
--bulma-success | Background color for success boxes |
--bulma-warning | Background color for warning boxes |
--bulma-danger | Background color for danger boxes |
--bulma-family-primary | Primary font for body text |
--bulma-family-heading | Font for headings |
--bulma-font-size | Base font size for body text |
--bulma-body-line-height | Line height for body text |
--bulma-font-weight | Default font weight for text |
--bulma-strong-weight | Font weight for elements |
--bulma-container-padding | Padding of the container (left and right) |
--bulma-article-padding | Vertical padding of articles or content areas |
--bulma-label-color | Color of form labels |
In our theme you can adjust many styles via SCSS 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.
Variables in _custom_colors.scss
| Variable | Meaning |
|---|---|
| $primary | Primary color |
| $text | Text color |
| $link | Link color |
| $link-hover | Link color on hover |
| $background | Page background color |
| $boxes-background | Background color of boxes, teaser boxes, contact box, news boxes, event boxes, form fields, breadcrumb etc. |
| $boxes-color | Text color of boxes, teaser boxes, contact box, news boxes, event boxes, form fields, breadcrumb etc. |
| $info | Background color of the info box, see text elements on the demo page |
| $success | Background color of the success box, see text elements on the demo page |
| $warning | Background color of the warning box, see text elements on the demo page |
| $danger | Background color of the danger box, see text elements on the demo page |
Variables in _custom_variables.scss
_custom_variables.scss already defines various variables to adapt the theme to your needs. The Bulma framework the theme is based on offers even more variables that you can define. You find them for the following elements in the Bulma documentation:
Breadcrumb Buttons Footer Forms Main navigation Modal dialog Pagination Subpage navigation Tables Tabs
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/naturetheme/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/naturetheme/fonts/ubuntu-v20-latin-regular.woff2') format('woff2');
}Then assign the font in the CSS variables as follows:
:root {
--bulma-family-primary: 'Ubuntu', sans-serif;
--bulma-family-heading: 'Ubuntu', sans-serif;
}$family-primary: 'Ubuntu', sans-serif;
$family-heading: 'Ubuntu', sans-serif;In the article settings under “CSS style selection” you can choose between different predefined layout styles.
🖥️ Article with full screen width This style removes the page margin – the article is displayed across the full screen width, without a left and right margin.
🖥️ Article with full screen height This style makes the article at least as high as the screen. The content is centered vertically – ideal for an intro or a home page.
👉 You find examples on the demo page of the theme.
You can easily control the background and text color of an article with CSS classes.
For example, the classes has-text-white and has-background-dark give you white text on a dark background.
👉 You find examples in the demo. 👉 For slanted edges with background colors and more details, see the detailed documentation on slanted edges.
You find a complete overview of all available color classes in the official Bulma documentation.
This page has helpful tips on optimizing the page speed of your website.
For optimal performance you should activate the cache. You find a helpful guide here (German): The perfect .htaccess file for Contao
As of Contao 4.8 you can serve images as WEBP files in the image sizes. You activate this under: Themes > Edit the image sizes of the theme > Edit the image size settings > Expert settings.
When importing the demo data this feature is deactivated by default, as not all hosting packages support WEBP.
When you add images, always choose a suitable image size. This way only the image size actually needed is loaded and the page stays fast. The NATURE theme already provides suitable image sizes for news, events, sliders and other elements.
Give your website more security and trust with HTTPS. You can usually activate this directly in your hosting package. Many providers offer free SSL certificates.
If several domains in one Contao installation should use the NATURE theme, this is possible with a few workarounds.
The goal of this guide is for each domain to have its own custom.scss, _custom_colors.scss and _custom_variables.scss. You should have at least NATURE theme version 1.11.0 (up to Contao 4.13) or 2.1.0 (Contao 5 and later) 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.
Create a folder in the file manager under naturetheme/scss (e.g. domain2). Copy the files custom.scss, _custom_colors.scss and _custom_variables.scss into this folder.
In _custom_colors.scss, adjust the paths of the color schemes as follows.
//@import '../../../../public/bundles/contaothemesnetnaturetheme/scss/color_schemes/nature_red_colors';
//@import '../../../../public/bundles/contaothemesnetnaturetheme/scss/color_schemes/nature_blue_colors';
//@import '../../../../public/bundles/contaothemesnetnaturetheme/scss/color_schemes/nature_dark_colors';
/*
* comment line to disable the ios dark mode
*/
//@import '../../../../public/bundles/contaothemesnetnaturetheme/scss/color_schemes/nature_dark_mode';//@import 'color_schemes/nature_red_colors';
//@import 'color_schemes/nature_blue_colors';
//@import 'color_schemes/nature_dark_colors';
/*
* comment line to disable the ios dark mode
*/
//@import 'color_schemes/nature_dark_mode';In the same folder, also create a file nature.scss with the following content.
@import '../../../../public/bundles/contaothemesnetnaturetheme/scss/bulma/utilities/initial-variables';
@import '../../../../public/bundles/contaothemesnetnaturetheme/scss/fonts';
@import "_custom_colors";
@import "../../../../public/bundles/contaothemesnetnaturetheme/scss/nature_colors";
@import "_custom_variables";
@import "../../../../public/bundles/contaothemesnetnaturetheme/scss/nature_variables";
@import "../../../../public/bundles/contaothemesnetnaturetheme/scss/nature_style";
@import 'custom';This is what it should look like in the end:
Under Templates, create a new template fe_page_nature.html5 and rename it (e.g. fe_page_nature_domain2.html5).
Look for the following line and add the name of the domain (domain2 in this example) inside
getCombinedStylesheet().
<link rel="stylesheet" type="text/css" media="all" href="<?= ContaoThemesNet\NatureThemeBundle\ThemeUtils::getCombinedStylesheet('domain2');Go to Themes and Edit the page layouts of the theme (4th icon from the right) and duplicate any layout. 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.
With version 2.5.0 the NATURE theme was made accessible, updated from Bulma 0.x to Bulma 1.x, and all SCSS variables were switched to CSS variables. This means a manual intermediate step is necessary when updating from an older version (< 2.5.0) to a newer version (≥ 2.5.0).
As of version 2.5.0 the file _custom_colors.scss no longer exists.
All color definitions are now in _custom_variables.scss.
📂 Old structure (< 2.5.0)
naturetheme/scss/
├── custom.scss
├── _custom_variables.scss
└── _custom_colors.scss📂 New structure (≥ 2.5.0)
naturetheme/scss/
├── custom.scss
└── _custom_variables.scssAfter the update to 2.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.
naturetheme, e.g. to naturetheme-alt.naturetheme with the current files is created.Moving images:
If there were images in the old naturetheme 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:
Some variables are not defined in :root but within a component:
Before (V1 – SCSS):
New (V2 – CSS variables):
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 2.5.0 and best practices for accessible design here: ♿ Accessibility in the NATURE theme
You find the current _custom_variables.scss here:
📄 GitHub: _custom_variables.scss
If you want to adjust the files manually, the scss folder must also contain an empty file named .v2 to activate the V2 structure.
With version 2.5.0 the NATURE theme was thoroughly revised with regard to accessibility and switched to CSS variables (Bulma 1.x). To use these features, a manual intermediate step is necessary when updating from an older version (< 2.5.0) to a newer version (≥ 2.5.0). ➡️ Guide: Update to CSS variables
Version 2.6.0 adds controls to the header to:
If you install the NATURE theme from version 2.6.0 and import the demo, the icons are already in the header.
Nature Theme Elemente -> 01_Header.NATURE01/02 under Template settings.wcag.NATURE01/02 is included automatically via the navigation template.mod_navigation_nature.html5, add the insert tag there manually.<div id="navbarMain" class="navbar-menu is-primary">
<?= $this->items ?>
{{theme::content::NATURE01/02}}
</div>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, feature element etc.
These templates have the suffix _bf (German “barrierefrei”, accessible).
When creating content, pay attention to the following:
This feature adds slanted edges to articles with background colors.
Add the CSS classes for slanted edges in the article settings under the field CSS style selection. If you use a newer version of the theme demo, the classes can be selected there. Otherwise you can enter the classes directly in the CSS class field.
| Slanted edge | CSS class |
|---|---|
| Slope at top ↖ (rises to the left) | has-slope-top-left |
| Slope at top ↗ (rises to the right) | has-slope-top-right |
| Slope at bottom ↘ (falls to the right) | has-slope-bottom-right |
| Slope at bottom ↙ (falls to the left) | has-slope-bottom-left |
Slanted edges only work in combination with background colors. Assign one of the following classes to an article, for example:
| Class | Background color (example) |
|---|---|
has-background-white | hsl(0, 0%, 100%) |
has-background-black | hsl(0, 0%, 4%) |
has-background-light | hsl(0, 0%, 96%) |
has-background-dark | hsl(0, 0%, 21%) |
has-background-primary | hsl(171, 100%, 41%) |
has-background-link | hsl(217, 71%, 53%) |
has-background-info | hsl(204, 86%, 53%) |
has-background-success | hsl(141, 71%, 48%) |
has-background-warning | hsl(48, 100%, 67%) |
has-background-danger | hsl(348, 100%, 61%) |
| Class | Background color (example) |
|---|---|
has-background-black-bis | hsl(0, 0%, 7%) |
has-background-black-ter | hsl(0, 0%, 14%) |
has-background-grey-darker | hsl(0, 0%, 21%) |
has-background-grey-dark | hsl(0, 0%, 29%) |
has-background-grey | hsl(0, 0%, 48%) |
has-background-grey-light | hsl(0, 0%, 71%) |
has-background-grey-lighter | hsl(0, 0%, 86%) |
has-background-white-ter | hsl(0, 0%, 96%) |
has-background-white-bis | hsl(0, 0%, 98%) |
You find an example page with slanted edges in our theme demo:
https://nature.contao-themes.net/layouts/schraege-kanten.html
There, articles without a background color and slope classes are placed between colored articles to create the effect.
This section explains all elements that the theme provides or that need adjusting, and how you can use them.
To create a button, add an element of type “Hyperlink”.
ce_hyperlink_buttoncontent_element/hyperlink/button_natureUnder Advanced CSS classes you can add classes to customize the look of the button. You find an overview of possible styles in the Bulma documentation.
👉 You find examples of different buttons in the demo.
To add a content box, place an element of type Content Box.
To display several elements side by side, place them as described in the section Grid.
Under Advanced CSS classes you can set a class for the background color of the content box:
.is-primary, .is-link, .is-info, .is-success, .is-warning or .is-danger.
If you set no class, the box is displayed in the default color (like the first element in the screenshot below).
You find examples in the demo.
For a full-width slider – like on the home page – create a separate article.
In the article settings, select the option Artikel mit voller Bildschirmbreite (article with full screen width)
under Expert settings in CSS style selection.
Place the two wrapper elements in the article: Content slider (wrapper start) and Content slider (wrapper end). Between them go one or more slider elements, depending on how many slides you want to show.
For the wrapper start element, select under CSS style selection:
Slider mit voller Breite und Höhe (full width and height) to show it full screenParallax-Slider to activate an animated parallax effect while scrollingIn the slider element you can add the following content:
Under CSS style selection you can also choose whether the text is displayed light (white) or dark (black) – depending on whether your background is rather dark or light. Without a selection, the text is displayed in black by default.
You find a complete example slider in the demo.
This feature is available from NATURE theme version 1.10.0.
You can adjust the height of the slider in _custom_variables.scss with the following CSS or SCSS variables:
:root {
--bulma-nature-slider-min-height: 100vh;
--bulma-nature-slider-mobile-min-height: 100vh;
}$nature-slider-min-height: 100vh; // Desktop
$nature-slider-mobile-min-height: 100vh; // MobilThe NATURE theme is based on Bulma – a modern CSS framework that lets you display content flexibly side by side. On mobile devices it is automatically stacked.
To display e.g. two text elements side by side, you need a wrapper: place two content elements of type Contao Themes (Inhaltscontainer Anfang) (content container start) and Inhaltscontainer Ende (content container end).
Assign the class .columns to the element Inhaltscontainer Anfang under Advanced CSS classes – this is the container class for the grid.
Between the wrapper elements, place the content elements that should appear side by side – e.g. two text elements.
Under Advanced CSS classes, give each of these elements the class .column.
With further Bulma classes you can control columns precisely:
e.g. widths such as .is-half, .is-one-third, or responsive classes such as .is-full-mobile, .is-one-quarter-desktop. You can also control spacing and alignment.
👉 See: Bulma column documentation
Since version 2.5.0 (only for new installations or if you updated to Bulma 1.x manually) two more modern grid variants are available:
.gridSee: Bulma smart grid
.fixed-grid.has-2-cols, .has-1-cols-mobile.grid, which then contains the content elementsSee: Bulma fixed grid
📌 The element group is a new content element in Contao 5, comparable to a wrapper start/end, but more modern and compact.
Place the header image in a separate article in the header. In the article settings, select
Artikel mit voller Bildschirmbreite (article with full screen width) under Expert settings in CSS style selection.
To place a header image, use the element type Image and select the template ce_image_headerimage (up to Contao 4.13) or content_element/image/header_image_nature (Contao 5 and later) under Template settings.
Under CSS style selection you can optionally choose a darker image, white text and a larger header image.
You find examples in the demo: header image dark, header image light, large header image dark, large header image light.
To add a hero element (text element with background), place an element of type Text and select
the template ce_text_cthemes_simplebox_nature (up to Contao 4.13) or
content_element/text/simplebox_nature (Contao 5 and later).
Under Advanced CSS classes you can select a class for the primary color if the hero element should be displayed in
a different background color: .is-primary, .is-link, .is-info, .is-success,
.is-warning and .is-danger. If no class is selected, it is displayed like the first element in the following screenshot.
You find examples in the demo.
For the element type List, besides an ordered and unordered list you can choose different templates:
You find examples in the demo.
To display a price table, place an element of type Preis-Tabelle (price table).
To highlight a box, fill in the field Label for highlighted box. To display several elements side by side, place them as described in the section Grid.
You find examples in the demo.
With the NATURE theme version 2.6.0 and later (only with Contao 5 and Bulma 1.x / V2) you can use shortlinks – small linked icons fixed to the left or right edge of the screen.
Create a new article, e.g. under “Nature Theme Elemente”.
In the article settings:
NATURE03/01| Position | CSS class |
|---|---|
| Left top | shortlinks left-top |
| Left center | shortlinks left-center |
| Left bottom | shortlinks left-bottom |
| Right top | shortlinks right-top |
| Right center | shortlinks right-center |
| Right bottom | shortlinks right-bottom |
💡 If you imported the current demo, you can also select these classes via CSS style selection.
Now add as many content elements of type Hyperlink to the article as you like.
| Field | Content |
|---|---|
| Link address | e.g. tel:+49123456789 or mailto:info@example.com |
| Link text | Icon via a Font Awesome insert tag, e.g. {{fa::phone}} |
| Link title | e.g. contact by phone |
👉 You find an explanation and a list of available insert tags here: Font Awesome Inserttag Bundle (GitHub)
Create a new module under Themes → Modules:
Custom HTML📌 Make sure the Theme Helper Tag (
NATURE03/01) matches the article.
Go to the page layout and open the include settings:
Footer (layout section)You find a complete overview of all available icons here: GitHub: Font Awesome Inserttag Bundle
The shortlinks now appear fixed to the left or right edge of the screen, depending on the chosen position.
✅ Ideal for:
You can set the following classes for the element type Table:
table is-bordered: with borderstable is-striped: stripedtable is-narrow: less spacingtable is-hoverable: with hoverYou can also combine all classes, e.g.: table is-bordered is-striped is-narrow is-hoverable.
You find examples in the demo.
First place an element of type Tabs-Reiter (tab header) for the individual tabs.
In the tab settings, always assign a unique value and a label.
Now place one element of type Tabs-Umschlag (Start) and one of type Tabs-Umschlag (Stop) for each tab. Place the content between the wrapper elements.
For the element type Tabs-Umschlag (Start), enter the corresponding value from the element Tabs-Reiter.
Example of the placed elements in the back end:
You find examples in the demo.
To add a teaser box, place an element of type Teaser Box.
You find examples in the demo.
For a teaser box as in the following screenshot, select the template ce_cthemes_teaserbox_fullheight. If you select Sticky Teaserbox under Expert settings in CSS style selection, the images “stick” to the top of the screen when scrolling down.
For a teaser box as in the following screenshot, select the template ce_cthemes_teaserbox_nature.
Place an element of type Text and icon.
You can define a headline, a text, the Font Awesome icon and optionally a link. You find a list of possible icons on the Font Awesome website. When you click an icon, you also see the classes at the top that you have to enter in the field Font Awesome 5 Icon (classes).
If the element should have a background, as in the following screenshot, select ce_cthemes_feature_element_nature under Template settings.
You find examples in the demo.
Templates:
event_teaser_nature: event list with images and teaserevent_list_nature: event list with teaser onlyevent_upcoming: simple list of eventsImage sizes:
Templates:
event_full_nature: event detailsevent_full_nature_header: header imageTemplates:
cal_default_nature: normal calendarcal_mini: mini calendarTo add a modal dialog, 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.
Navigation templates:
nav_default_nature: main navigationnav_default_nature_aside: subpage navigationCustom templates:
mod_navigation_nature: main navigationmod_navigation_nature_aside: subpage navigationThis feature is only available from NATURE theme version 1.6.0.
To display a mega menu, select the template mod_navigation_nature_megamenu for the module type Navigation menu.
You can customize the mega menu with variables in _custom_variables.scss:
$megamenu-width: 100%; // Breite des Megamenü
$megamenu-right: 0px; // Abstand zum rechten Bildschirmrand
$megamenu-background-color: $boxes-background; // Hintergrundfarbe
$megamenu-background-color-home: $megamenu-background-color; // Hintergrundfarbe nur für die Startseite
$megamenu-item-width: 20%; // Breite der Spalten, z. B. 20% für 5 Spalten
$megamenu-padding: 20px 60px 5px 30px; // Innenabstand oben, rechts, unten, links
$megamenu-link-lvl2-color: #000; // Schriftfarbe Level 2
$megamenu-link-lvl2-color-hover: $primary; // Schriftfarbe Level 2 bei Mouse Hover
$megamenu-link-lvl3-color: #4a4a4a; // Schriftfarbe Level 3
$megamenu-link-lvl3-color-hover: $link-hover; // Schriftfarbe Level 3 bei Mouse Hover
$megamenu-border-color: $primary; // RahmenfarbeCreate a .js file, e.g. custom.js, with the following content. You can include the file in the page layout under External JavaScripts.
jQuery(document).ready(function($) {
$('.megamenu .level_1 > .navbar-item').hover(function() {
$('.navbar-dropdown.level_2').css('display', 'none');
$(this).find('.navbar-dropdown.level_2').css('display', 'flex');
});
$('body').click(function() {
$('.navbar-dropdown.level_2').css('display', 'none');
});
});Templates:
news_latest_nature_col2: news list with images and teaser (two columns)news_latest_nature_col3: news list with images and teaser (three columns)news_short_nature: news list with teaser onlynews_simple: simple list of newsImage sizes:
Templates:
news_full_nature: news detailsnews_full_nature_header: header imageWith the Social Feed Bundle you can display posts from Facebook and Instagram in the NATURE theme. Simply install the package named pdir/social-feed-bundle with the Contao Manager.
A guide on setting up the feed and placing the modules can be found on the following page: Social Feed documentation.
When setting up the news module, select news_social_feed_nature as the news template.
The social feed is already styled in the NATURE theme as shown in the following screenshots.
First install the extension Sprachenwechsler (terminal42/contao-changelanguage) in the Contao Manager.
Open the site structure and duplicate the website root including its subpages. After duplicating, all pages and articles are invisible, so you have to make every page and every article visible for a change to show in the front end.
In the page settings of the website root for the new language, enter the corresponding language code under DNS settings -> Language, e.g. en.
Edit each page of the new language and select the corresponding page in the main language under Language & translation.
Select Themes in the left navigation and edit the front end modules of the theme (gear icon). Create a new module of type Change language (under Miscellaneous). Further settings are not strictly necessary.
Select Themes in the left navigation again and edit the page layouts of the theme (to the right of the gear icon). In the corresponding layout, duplicate the first row under Front end modules and select the module you just created. The module must be at the very top and in the header.
Finally, add the following SCSS to custom.scss. You find it in the file manager under naturetheme/scss.
body:not(.home):not(.contact) #header .inside {
padding-top: 140px;
}
nav.mod_changelanguage {
position: absolute;
top: 0;
width: 100%;
height: 40px;
background: #000;
left: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 85px 0 50px;
ul {
display: flex;
li {
padding-left: 10px;
}
}
+ .mod_navigation {
top: 40px;
}
}
@media (max-width: 1023px) {
.full-width-height-slider .text {
padding-top: 160px;
}
nav.mod_changelanguage {
padding: 0 20px;
}
}In the end, as shown in the screenshot, a bar with the language switcher should appear above the main navigation.
You find a demo with the one-page navigation here.
Install the extension Onepage Navigation by Erdmann & Freunde with the Contao Manager and update the database.
Create a module of type Artikelnavigation (Onepage) and select the template mod_onepage_navigation_nature under Module template.
Create a new layout or duplicate an existing one and select the module you just created under Included modules.
To keep the navigation at the top of the screen when scrolling down, add the following code snippets under Custom JavaScript code and Additional head tags. You can of course also move them to separate files and include the files in the layout.
<script>
jQuery(document).ready(function($) {
stuckNavbar();
$(window).scroll(function () {
stuckNavbar();
});
function stuckNavbar() {
var scrollPos = $(window).scrollTop();
if (scrollPos > 0) {
$('.mod_navigation.navbar').addClass('stuck');
} else {
$('.mod_navigation.navbar').removeClass('stuck');
}
}
});
</script><style>
.mod_navigation.navbar {
position: fixed;
transition: all .3s;
&.stuck {
height: 70px;
.navbar-brand img {
max-height: 40px;
}
.navbar-start {
padding: 0 70px;
}
}
}
</style>Assign the new layout to the page or the website root.
Create an article for each menu item. In the article settings, tick Add as navigation item under One-page navigation.
The NATURE 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/naturetheme/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.
If no breadcrumb should be displayed in the list and detail view, simply duplicate the one-column layout (under Themes) and remove the breadcrumb from Included modules. Then assign the layout to the pages under Layout settings.
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.
Under the page for the list view, create an article for the header image. Under Elements you find all notes on creating a header image.
Under the page for the exposé, also create an article for the header image and place the module of type MaklerModul Kopfbild there.
For the articles of the header image and the exposé, select Artikel mit voller Bildschirmbreite (article with full screen width) under CSS style selection in the article settings.
If you have carried out all steps as described, the list should be displayed as in the following screenshots.
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.
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 ODD theme requires at least Contao 5.0.0 and PHP 8.0.
We recommend Contao 5.3 with PHP 8.3 or higher to get the best possible loading time with our theme!
The ODD theme can easily be installed via the Contao Manager. You find a step-by-step installation guide here: ODD theme installation.
The ODD theme is available for free (with copyright notice) or with a paid license (without copyright notice).
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 (possible payment methods are PayPal, Sofortüberweisung or credit card) you receive an invoice by email and we will activate your domain shortly, so that you can register it in the Contao back end.
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 0.1 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 03 Copyright under Elemente > 03 Footer and edit it via the pencil icon.
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 ODD 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!
First open the Contao Manager at the following URL: www.your-domain.com/contao-manager.phar.php. Select Discover, enter odd theme in the search field and add the package ODD Theme.
Then switch to Packages, enter the version ^2.0 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. In the install tool you also have to create an admin user account.
You reach the install tool in the Contao Manager via the menu item Tools or via the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select the menu item ODD Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. This creates all files in the file manager under the folder odd 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.
Now open the install tool. Under the tab “Import a template” 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.
In the settings under System -> Settings, select the class set bootstrap4.json in the tab Advanced CSS settings.
Done!
Your website should now show the theme’s demo content when you open your domain.
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)
For your own JavaScript, it is best to create a separate file and include it in the theme.
The page ODD Elements contains articles that you can include anywhere on your website with an insert tag. To get to the articles, click Articles in the left menu and scroll all the way down.
In the article settings (wrench icon) of the article, select the matching Theme Helper Tag under Template settings.
You can then add the article with the following insert tag in an HTML element or template, e.g. {{theme::content::ODD01/01}}.
How to define your own Theme Helper Tags is explained in the Theme Helper documentation.
You find the header content in the articles under ODD Elements > 01 / Kopfzeile.
You replace the logo in the article 01/01 Logo.
You find the contact details and social media links in the article 01/02 Top Navbar, where you can change them.
How to activate the straight header is explained on the page Layouts.
You find the footer content in the articles under ODD Elements > 02 / Fußzeile. These articles are included in the modules Footer / Main and Footer / Copyright.
After installing the theme, you find the SCSS files in the file manager under the path odd/scss.
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 odd 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 ODD 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 and grey 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 'color_schemes/odd_green_colors_contrast';
//@import 'color_schemes/odd_blue_colors_contrast';
//@import 'color_schemes/odd_grey_colors_contrast';
//@import 'color_schemes/odd_red_colors_contrast';
//@import 'color_schemes/odd_yellow_colors_contrast';
//@import 'color_schemes/odd_purple_colors_contrast';
//@import 'color_schemes/odd_pastel_colors_contrast';
//@import 'color_schemes/odd_grey_colors';
//@import 'color_schemes/odd_blue_colors';Important note
If you use the latest version of the ODD theme, you may wonder where _custom_colors.scss has gone.
Don’t worry: as of ODD version 3.7.0, a new installation of the ODD 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.7.0 the ODD 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 odd/scss/_custom_variables.scss.
✅ Example: activating a variable
// Vorher (nicht aktiv):
//--oddColor1: #A3CC00;
// Nachher (aktiv):
--oddColor1: #A3CC00;🔧 The most important CSS variables
Here is an overview of the most important CSS variables that you can adjust in
odd/scss/_custom_variables.scss.
| Variable | Meaning |
|---|---|
--oddColor1 | Primary color, light shade |
--oddColor2 | Primary color |
--oddColor3 | Primary color, dark shade |
--oddColor4 | Secondary color |
--oddColor5 | Secondary color, light shade |
--oddColor6 | Boxes and text |
--oddColor7 | Page background |
Base colors in _custom_colors.scss
$oddColor1: Primary color, light shade $oddColor2: Primary color $oddColor3: Primary color, dark shade $oddColor4: Secondary color $oddColor5: Secondary color, light shade $oddColor6: Boxes and text $oddColor7: Page background
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/odd/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/odd/fonts/ubuntu-v20-latin-regular.woff2') format('woff2');
}Then assign the font in the CSS variables in _custom_variables.scss as follows:
:root {
--mainFont: 'Ubuntu', sans-serif;
--headingFont: 'Ubuntu', sans-serif;
}$mainFont: 'Ubuntu', sans-serif;
$headingFont: 'Ubuntu', sans-serif;By default the ODD theme comes with a slanted header. To activate the straight header, select a layout with a straight header in the page settings.
Among the modules there is a navigation module for the slanted and the straight header (Navigationsleiste mit Schräge and Navigationsleiste ohne Schräge), which is included in the respective layouts.
You find an example on the page Layout with straight header.
Under Themes > Page layouts various layouts for one-, two- and three-column layouts with a slanted or straight header are already created, which you can assign in the page settings under Layout settings.
If several domains in one Contao installation should use the ODD theme, this is possible with a few workarounds.
The goal of this guide is for each domain to have its own custom.scss, _custom_colors.scss and _custom_variables.scss.
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.
Create a folder in the file manager under odd/scss (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/pdirthemeodd/scss/color_schemes/odd_grey_colors';
//@import '../../../../public/bundles/pdirthemeodd/scss/color_schemes/odd_blue_colors';In the same folder, also create a file odd.scss with the following content.
@charset "UTF-8";
@font-face {
font-family: 'Cabin';
font-display: swap;
src: local('Cabin'),
url('/bundles/pdirthemeodd/fonts/Cabin/cabin-regular-webfont.woff2') format('woff2'),
url('/bundles/pdirthemeodd/fonts/Cabin/cabin-regular-webfont.woff') format('woff'),
url('/bundles/pdirthemeodd/fonts/Cabin/cabin-regular-webfont.ttf') format('ttf'),
url('/bundles/pdirthemeodd/fonts/Cabin/cabin-regular-webfont.eot') format('eot');
}
@font-face {
font-family: 'Muli';
font-display: swap;
src: local('Muli'),
url('/bundles/pdirthemeodd/fonts/Muli/muli-regular-webfont.woff2') format('woff2'),
url('/bundles/pdirthemeodd/fonts/Muli/muli-regular-webfont.woff') format('woff'),
url('/bundles/pdirthemeodd/fonts/Muli/muli-regular-webfont.ttf') format('ttf'),
url('/bundles/pdirthemeodd/fonts/Muli/muli-regular-webfont.eot') format('eot');
}
@import "../../../../public/bundles/pdirthemeodd/scss/_odd_colors";
@import "_custom_colors";
@import "../../../../public/bundles/pdirthemeodd/scss/_odd_variables";
@import "_custom_variables";
@import '../../../../public/bundles/pdirthemeodd/scss/style';
@import 'custom';Under Templates, create a new template fe_page_odd.html5 and rename it (e.g. fe_page_odd_domain2.html5).
In line 41, add the newly created folder from the file manager to getCombinedStylesheet().
<link rel="stylesheet" type="text/css" media="all" href="<?= ContaoThemesNet\ThemeOddBundle\ThemeUtils::getCombinedStylesheet('domain2'); ?>">Go to Themes and Edit the page layouts of the theme and duplicate any layout. 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 (Layout settings -> Assign a layout).
In the article settings of the header and footer content (under ODD Elements) you can select the corresponding page under Template settings so that the content of this article is actually used.
With version 3.7.0 the ODD 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.7.0) to a newer version (≥ 3.7.0).
As of version 3.7.0 the file _custom_colors.scss no longer exists.
All color definitions are now in _custom_variables.scss.
📂 Old structure (< 3.7.0)
odd/scss/
├── custom.scss
├── _custom_variables.scss
└── _custom_colors.scss📂 New structure (≥ 3.7.0)
odd/scss/
├── custom.scss
└── _custom_variables.scssAfter the update to 3.7.0 or higher the site still works, but not all new features are available right away. You should therefore create the current theme files.
odd, e.g. to odd-alt.odd with the current files is created.Moving images:
If there were images in the old odd 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.7.0 and best practices for accessible design here: ♿ Accessibility in the ODD theme
You find the current _custom_variables.scss here:
📄 GitHub: _custom_variables.scss
If you want to adjust the files manually, the odd folder must also contain an empty file named .v2 to activate the V2 structure.
With version 3.7.0 the ODD 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.7.0) to a newer version (≥ 3.7.0). ➡️ Guide: Update to CSS variables
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:
To add a content box, place an element of type Content Box.
To display several elements side by side, place them as described in the section Grid. You find an example in the ODD demo on the page Weitere ODD-Elemente.
The content slider must always be placed in its own article, which needs the classes slider and fullwidth
under Expert settings. If the slider should also get a slant to the bottom right or left, give the article the
class skw-br or skw-bl as well, see the table below.
In the article, place the elements Content-Slider (Umschlag Anfang) (wrapper start) and Content-Slider (Umschlag Ende) (wrapper stop). Between the wrapper elements, place one element of type Slider-Element per slide.
Add the image via the checkbox Add an image. If the slider should have a slant, also select the image size Slider mit Schräge (1920x900); for a slider without a slant, select the image size Slider (1920x750).
Reference table for the article classes:
| Slider | Classes in the article | Screenshot |
|---|---|---|
| without slant | slider fullwidth |
![]() |
| with slant bottom left | slider fullwidth skw-bl |
![]() |
| with slant bottom right | slider fullwidth skw-br |
![]() |
You find an example with a content slider on the page Content-Slider or on the home page of the ODD demo.
You can adjust the position of the text box by adding a class.
top-left: top lefttop-center: top centertop-right: top rightcenter-left: center leftcenter-center: centercenter-right: center rightbottom-left: bottom leftbottom-center: bottom centerbottom-right: bottom rightThe page Elemente mit Schrägen already contains various examples of elements with slanted edges.
Each section must be in its own article, which needs various classes:
primary-bg: background colorskw-tl: slant to the top leftskw-tr: slant to the top rightskw-bl: slant to the bottom leftskw-br: slant to the bottom right
For example, to give the article slants to the top right and bottom right (like the first example on the demo page),
add the classes primary-bg skw-tr skw-br in the article settings under Expert settings.
Reference table for the article classes:
The theme uses Bootstrap 4, which lets you, among other things, display elements side by side and at the same time in a single column on mobile devices.
For example, to display two text elements side by side, first add one element each of type
Contao Themes (Inhaltscontainer Anfang) (content container start) and Contao Themes (Inhaltscontainer Ende)
(content container end). The content container start element needs the class row.
Between the wrapper elements, place two text elements and select .col-12 and .col-md-6 under
Advanced CSS classes > Column widths for each. This means the elements are displayed in one column below a
width of 768px and in two columns above it. How exactly to use the classes is explained in the
Bootstrap 4 documentation.
You find an example in the ODD demo on the page Textelemente.
To place a header image, use the element type Image and select the template ce_image_headerimage_odd (up to Contao 4.13) or content_element/image/header_image_odd (Contao 5 and later) under Template settings.
For a header image without a slant, select the image size Headerbild (1920x400). You have to place the header image in its own article and select the template mod_article_fullwidth in the article settings.
You find an example on the page Headerbild ohne Schräge.
For a header image with a slant to the left, select the image size Headerbild (1920x400). You have to place the
header image in its own article, select the template mod_article_fullwidth in the article settings and add the
class skw-bl under Expert settings.
You find an example on the page Headerbild mit Schräge nach links.
For a header image with a slant to the right, select the image size Headerbild (1920x400). You have to place the
header image in its own article, select the template mod_article_fullwidth in the article settings and add the
class skw-br under Expert settings.
You find an example on the page Headerbild mit Schräge nach rechts.
You find examples of the headings on the page Textelemente.
To display the heading left-aligned and underlined, give the text element the class bordered-heading.
To display the heading centered and underlined, give the text element the classes bordered-heading and
text-sm-center.
You can set the class text-sm-center under Advanced CSS classes > Alignment.
To display the heading right-aligned and underlined, give the text element the classes bordered-heading and
text-sm-right.
You can set the class text-sm-right under Advanced CSS classes > Alignment.
If you give a link the class btn, it is displayed as a button.
To display a pricing table, place an element of type Preis-Tabelle (pricing table).
To highlight a box, fill in the field Bezeichnung für Hervorgehobene Box (label for highlighted box). To display several elements side by side, place them as described in the section Grid. You find two examples in the ODD demo on the page Weitere ODD-Elemente.
If you select the template ce_text_cthemes_simplebox under Template settings of a text element, it gets a white background as in the following screenshot.
To display several elements side by side, place them as described in the section Grid. You find an example in the ODD demo on the page Weitere ODD-Elemente.
To add a teaser box, place an element of type Teaser Box.
Add the image via the checkbox Add an image. Select the image size Teaserboxen (350x200).
To display several elements side by side, place them as described in the section Grid. You find an example in the ODD demo on the page Weitere ODD-Elemente.
Place an element of type Text und Icon (text and icon).
You can define a headline, a text, the Font Awesome icon and optionally a link. You find a list of available icons on the Font Awesome website. When you click an icon, you also see the classes at the top that you have to enter in the field Font Awesome 5 Icon (Klassen).
You find an example in the ODD demo on the page Weitere ODD-Elemente.
This page explains all modules and how you can use them.
The following modules are explained on this page:
Follow these steps to place an event list:
event_teaser_zeroone (event list with images)event_list_zeroone (event list without images)event_upcoming (simple event list with date and title only)mod_eventlist_zeroone (Template settings)Follow these steps to place the event reader (detail view):
event_full_zeroone (Template settings)Follow these steps to place a calendar:
cal_default (regular calendar)cal_mini (mini calendar)mod_calendar_zeroone (Template settings)The ODD theme uses Headroom.js to hide or show the navigation when you scroll down or up. To deactivate this, edit the template fe_bootstrap_odd and delete or comment out the following line near the end of the file.
$combiner->add('bundles/pdirthemeodd/js/headroom.min.js');
In the same way you could also deactivate Font Awesome by removing the following line.
$combiner->add('bundles/pdirthemeodd/fontawesome/js/all.min.js');
Follow these steps to place a news list:
news_latest_zeroone (news list with images)news_short_zeroone (news list without images)news_simple (simple news list with date/author and title only)mod_newslist_zeroone (Template settings)Follow these steps to place the news reader (detail view):
news_full_zeroone (Template settings)Follow these steps to place a newsletter form:
nl_default_zeroone (Template settings)Follow these steps to place a search engine:
mod_search_zeroone (Template settings)The ODD theme already ships templates and stylesheets for the Maklermodul (real estate module).
The Maklermodul documentation contains all information on installing and setting up the Maklermodul.
Add the following line to custom.scss (/files/odd/scss) 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 (property list) as described in the documentation.
Create a module of type Expose as described in the documentation.
Create a module of type MaklerModul Kopfbild (header image) 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).
For the articles of the header image and the detail view, select the template mod_article_fullwidth in the article settings (wrench icon) under Template settings.
If the filters in the list view should always be visible instead of only after clicking the button “Filter ausklappen”, you can achieve this with a small template change. Create the template makler_list_odd and remove the following two lines at around line 41:
<a href="<?= $this->staticListPage ?>" class="btn toggle-filter show-filter active">Filter ausklappen</a>
<a href="<?= $this->staticListPage ?>" class="btn toggle-filter hide-filter">Filter einklappen</a>If you carried out all steps as described, the list should be displayed as in the following screenshots.
To build a multilingual website with the ODD 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 ODD Elements in the article settings under Template settings.
With the Social Feed Bundle you can display posts from Facebook and Instagram in the ODD theme. Simply install the package pdir/social-feed-bundle via the Contao Manager.
How to set up the Facebook stream and how to place the modules is explained on the following page: Social Feed documentation.
When setting up the news module, select news_social_feed_odd as the news template.
You can update the theme easily via the Contao Manager. Then open the install tool and update the database.
A database backup beforehand never hurts!
When updating the theme from version 1 to 2, a few changes are necessary, because Contao Bootstrap and Bootstrap Grid are no longer dependencies of the theme in version 2.
In the page layouts, the page template fe_page_odd (one column), fe_page_odd_left (two columns with left column), fe_page_odd_right (two columns with right column) or fe_page_odd_three_columns (three columns) must be selected (previously fe_bootstrap_odd).
For the navigation modules (e.g. Navigationsleiste mit Schräge and Navigationsleiste ohne Schräge), the module type must be changed to Navigation menu.
As module template, mod_navigation_odd_sloping (navigation with slant), mod_navigation_odd (without slant) or mod_navigation_odd_sloping_topright (slant in the opposite direction) must be selected.
As navigation template, nav_default_odd must be selected.
If the module types Registration or Personal data are used, member_grouped must be selected as the template (previously member_grouped_bs_odd).
If a Bootstrap gallery was used, the element type must be changed to a regular gallery.
If you ran into problems during installation or setup, or you found a display error of the theme in a particular browser, please create a new ticket at:
Please check beforehand whether your issue is already known.
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.9 or higher.
Contao 4 requires a web server such as Apache or NGINX with PHP and MySQL support. Our theme requires Contao 4.9 or higher and PHP 7.1.
The theme can easily be installed via the Contao Manager. You find an installation guide here.
The ODD Isotope Bundle can only be installed into an empty Contao installation and is compatible with Contao 4.9 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!
Install the ODD Isotope Bundle by editing the file composer.json in the Contao root directory. Add the following lines at the end of the file (as in the example composer.json below). Replace the domain and the password.
,
"repositories": [
{
"type": "composer",
"url": "https://[DOMAIN]:[PASSWORT]@packages.contao.store"
}
]Add the following line at the end of require. Don’t forget the comma in the second-to-last line.
"contao-themes-net/odd-isotope-bundle": "^1.0"Example of what composer.json should look like for Contao 4.13:
{
"type": "project",
"require": {
"contao/calendar-bundle": "^4.13",
"contao/comments-bundle": "^4.13",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "^4.13",
"contao/listing-bundle": "^4.13",
"contao/manager-bundle": "4.13.*",
"contao/news-bundle": "^4.13",
"contao/newsletter-bundle": "^4.13",
"contao-themes-net/odd-isotope-bundle": "^2.0"
},
"extra": {
"contao-component-dir": "assets"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
},
"repositories": [
{
"type": "composer",
"url": "https://BENUTZERNAME:PASSWORT@packages.contao.store"
}
]
}Now open the Contao Manager, click Update for all existing packages (i.e. only Contao) and run the update by clicking the button Apply changes at the bottom.
Then open the install tool and update the database. In the install tool you also have to create an admin user account.
You reach the install tool in the Contao Manager via the menu item Tools or via the URL: www.your-domain.com/contao/install.
Log in to the back end with the user account you created and select the menu item ODD Theme Setup under CONTAO-THEMES-NET in the left navigation. Then click the button Synchronize theme files. This creates all files in the file manager under the folder ODD and copies the SQL files for the database import into the templates folder.
Select the menu item ODD Isotope Setup under CONTAO-THEMES-NET in the left navigation and click the button Synchronize files to create all product images and move the SQL files into the templates folder so that they can be imported.
Then empty the database table ’tl_files’ by clicking the button Empty table ’tl_files’ in the ODD Theme Setup.
Emptying the tl_files table deletes the image references. This is only necessary for the first installation of the theme.
In the install tool, import the template named odd_isotope_attributes.sql. Make sure to tick Do not truncate tables.
Then clear the cache.
When you open the install tool now, some new fields should be created. Update the database.
In the install tool, import the template named odd_isotope_demo_contao_4.x.x.sql (depending on your Contao version). Make sure to tick Do not truncate tables.
For the import to work, Contao must be installed with the bundles for news, calendar, FAQ, newsletter, listing and comments.
If you don’t want to use these Contao bundles, you can uninstall them afterwards.
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.
Under Advanced CSS settings, select the class set bootstrap4.json.
In addition, Use folder URLs must be active. You find it in the settings under Front end settings (up to Contao 4.10) or in the site structure in the settings of the website root under URL settings (Contao 4.11 and later).
Add the following line to custom.scss (file manager, under odd/scss) so that the styling is loaded:
@import '../../../public/bundles/contaothemesnetoddisotope/scss/isotope';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 import statement.
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)
You find the Isotope manual here: User manual (German)
You can update the theme easily via the Contao Manager. Then open the install tool and update the database.
If a problem occurs after the update, also have a look at our possible solutions.
A database backup beforehand never hurts!
If you ran into problems during installation or setup, or you found a display error of the theme in a particular browser, please create a new ticket at:
Please check beforehand whether your issue is already known.
This guide describes what to do if you want to move your theme to another server.
First back up the database. You can simply export the database with phpMyAdmin (available in your hosting account).
Back up the following folders:
Back up the following files:
If you have made other customizations, you may also need to back up the folder /contao or /src. If you still use old Contao 3 extensions, you may also need to back up folders in /system/modules. (You can ignore symlinks here.)
Create a new database and import the SQL file of the backed-up database.
Edit the backed-up parameters.yml with an editor and replace the access data of the old database with that of the new database. All other parameters stay as they are.
parameters:
database_host: localhost
database_port: 3306
database_user: DATENBANK_USER
database_password: DATENBANK_PASSWORT
database_name: DATENBANK_NAMENow install Contao as usual with the file contao-manager.phar.php in the web folder.
Important: do not update the database yet after the installation!
Now copy all backed-up files back to the right places. It is important that all files are copied back to the correct location, i.e. not into the web folder, but one level above it.
From Contao version 4.8, parameters.yml and config.yml go into the folder /config; for versions lower than 4.8, the files must be in the folder app/config.
Once you have copied composer.json and composer.lock back to the right place and opened the Contao Manager, new packages should be shown under the menu item Packages. Click the button Apply changes in the footer to install all extensions.
Once all extensions have been installed, open the install tool and update the database.
Now open the website and check that everything works.
If problems remain, you can recreate the symlinks under system maintenance in the back end and clear the script and image cache. This is not strictly necessary, though.
There are two ways for an existing Contao installation:
First install the corresponding theme with the Contao Manager, update the database and then synchronize the theme files on the Theme Setup page in the back end. Do not click the button “Empty table ’tl_files’” under any circumstances, otherwise all image references will be lost. You can skip the steps import database and recreate symlinks. You can still carry out the steps under Settings, though. You find more information on the steps on the Installation page of the respective theme in the navigation.
To import the theme, go to the menu item Themes and click the Import button.
You find the cto file under product help. Download the file for your theme and your Contao version and import it.
A message should appear that the theme was uploaded successfully.
The new theme should now be visible under Themes.
You can now either continue with the next step and import the theme demo, or create the pages and content elements yourself.
With the Migration Bundle you can import the pages and articles of the theme demo. The Migration Bundle is easy to install with the Contao Manager.
First download the ZIP file for your theme and your Contao version from
product help. Unzip it and move the subfolder to
files/contentMigration/yourUser. For the MATE theme on Contao 4.9 this would be, for example,
files/contentMigration/yourUser/mate_theme_contao_4.9. The theme folder should then contain all the model files.
Once the bundle is installed, you should see two new buttons Export and Import in the site structure. Select Import to import all pages and articles of the theme demo.
Select Full import as the import type and the correct folder name, and click Import.
A message should appear that pages, articles and content elements were imported successfully.
The pages of the theme should now be visible in the site structure.
As the IDs of the content in the new installation differ from the demo, not everything can be assigned correctly. Further adjustments are therefore necessary.
If you are not sure which modules or content go where, you could also set up the theme in a fresh Contao installation and compare it there.
In the page settings, select the correct page layout of the theme if it says Unknown option.
In the articles, select the correct module if the assignment is wrong.
All images have to be selected again. Click into a content element and select an image if “Add an image” is ticked.
News, events, FAQ, newsletters and forms have to be created manually; the current version of the Migration Bundle does not import them yet.
In the news, event, FAQ and newsletter modules, select the corresponding archive.
In the articles, assign the correct form to the form element (e.g. on the contact page).
Images may have been assigned the wrong image size. In that case, select the correct image size.
For pages of type internal redirect, select the correct redirect page.
This only applies to the MATE theme. In the articles, the grid stop element has to be reassigned to the grid start element. Click the pencil to edit it and select the correct parent element.