NATURE Theme for Contao
Quick start
The theme documentation covers these topics:
Quick start
The theme documentation covers these topics:
The theme can only be installed into an empty Contao installation and is compatible with Contao 4.4 or higher.
Version 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.