Skip to main content

Customization

JavaScript customization

For your own JavaScript, it is best to create a separate file and include it in the theme.

Placing elements with your own insert tag

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.

Placing elements with your own insert tag Placing elements with your own insert tag

In the article settings (wrench icon) of the article, select the matching Theme Helper Tag under Template settings.

Selecting the Theme Helper Tag Selecting the Theme Helper Tag

You can then add the article with the following insert tag in an HTML element or template, e.g. {{theme::content::ODD01/01}}.

Including the article with an insert tag Including the article with an insert tag

How to define your own Theme Helper Tags is explained in the Theme Helper documentation.

Customizing the header

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.

Choosing between a straight or slanted header

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.

Customizing colors and fonts

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.

Tip

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.

Note

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.

Color schemes

By default the ODD theme comes with a light layout and a green primary color. You can also choose other color schemes:

  • Light color scheme / green primary color
  • Light color scheme / blue primary color
  • Light color scheme / red primary color
  • Light color scheme / yellow primary color
  • Light color scheme / purple primary color
  • Light color scheme / pastel colors
  • Dark color scheme

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';

Variables

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:

  • v2 (new installation from version 3.7.0): A new installation of the theme only has _custom_variables.scss with all color and variable settings. Use CSS variables for your customizations.
  • v1 (version older than 3.7.0 / update from a version older than 3.7.0): If you updated the ODD theme or installed a version older than 3.7.0, both _custom_variables.scss and _custom_colors.scss remain. Use SCSS variables for your customizations.
Tip

ℹ️ 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.

VariableMeaning
--oddColor1Primary color, light shade
--oddColor2Primary color
--oddColor3Primary color, dark shade
--oddColor4Secondary color
--oddColor5Secondary color, light shade
--oddColor6Boxes and text
--oddColor7Page 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


Adding a font

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:

👉 Google Webfonts Helper

There you can:

  • choose a font from the Google Fonts library,
  • select the font styles you need,
  • download a ZIP file with the font files,
  • and generate the matching @font-face CSS code right away.
  • Important: Under “Customize Folder prefix”, enter the path to your fonts folder, e.g. /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;
Nov 9, 2026 Spare Zeit bei allen Webprojekten mit pdir+

Subsections of Customization

Layouts

Layout with straight header

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.

One- and multi-column layouts

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.

Nov 9, 2026 Spare Zeit bei allen Webprojekten mit pdir+

FAQ

Images

Why is an image not displayed?

The folder in the file manager may not be set to public. You can check this by editing the folder. Public must be ticked, otherwise the image is not displayed in the front end.

Why doesn’t the large view of an image open in a lightbox when I click it?

The theme has to load jQuery and the jQuery template j_colorbox. You can edit the layout in the back end under Themes via the third-to-last icon Edit the page layouts of theme ID 1.

Why are animated GIFs not displayed?

For animated GIFs, do not set an image size in the image settings, otherwise the animation is lost.

How do I add my own image to the social media icons in the header?

In the article 01/02 Top Navbar (at the very bottom under ODD Elements - 01/Kopfzeile), create a new element of type Image inside the content container (see screenshot 1).

In the element settings, set an image size, e.g. Fit the frame / 40px. Activate Overwrite metadata and set a link under Image link address. In the expert settings, also set the class icon (see screenshot 2).

Finally, add the following CSS code to custom.scss.

In the end it should look like the third screenshot.

Screenshot 1:

Screenshot 2:

Screenshot 3:

How do I define a second logo for the narrow navigation bar?

In the article 01/01 Logo (under ODD Elemente - 01 / Kopfzeile), add a second image element and give it e.g. the class stuck-logo (the second input field under Expert settings).

Now add the following CSS to custom.scss:

Contao 5.0 and later

.stuck-logo {
  display: none;
} 

.stuck .stuck-logo { display: block; }

.stuck .navbar-brand .content-image:not(.stuck-logo) { display: none; }

Up to Contao 4.13

.stuck-logo {
  display: none;
} 

.stuck .stuck-logo { display: block; }

.stuck .navbar-brand .ce_image:not(.stuck-logo) { display: none; }

A different logo should now be displayed when you scroll down from the top and the narrow navigation bar appears.

Why are some images not displayed? (WEBP support)

If newer browsers try to load a WEBP image and it is not supported, an error may occur.

The error message may look something like this:

request.CRITICAL: Uncaught PHP Exception RuntimeException: "Image format "webp" is not supported in Imagine\Imagick\Imagine on this environment. Consider removing this format from contao.image.valid_extensions or switch the contao.image.imagine_service to an implementation that supports it. 

Possible solutions:

#1 Update Imagine or have your host do it (use the latest version)

#2 Use an alternative image processing service

You can specify a different image processing service in config.yml; afterwards the cache has to be cleared. This often solves the problem already. If WEBP is supported, you should also be able to select it in the image sizes.

contao:
    image:
        imagine_service: 'contao.image.imagine.gd'

or

contao:
    image:
        imagine_service: 'contao.image.imagine.gmagick'

#3 Remove WEBP from the allowed file extensions

Add the following to config.yml and then clear the cache.

contao:
    image:
        valid_extensions:  
            - jpg
            - jpeg
            - gif
            - png
            - tif
            - tiff
            - bmp
            - svg
            - svgz

#4 Adjust the .htaccess

<IfModule mod_mime.c>
   AddType image/webp .webp
</IfModule>

Labels & translations

How do I change the read-more link of events or translate it into other languages?

You can either edit the template event_list_odd.html5 or event_teaser_odd.html5 directly or override it in langconfig.php (only from ODD theme version 1.4.2).

Edit the file langconfig.php under system/config, or create it if it does not exist yet. You can override the text with the following line:

<?php
$GLOBALS['TL_LANG']['odd']['event_more_link'] = "Details";

Or as follows to override it e.g. in a specific language:

<?php
if ($GLOBALS['TL_LANGUAGE'] == 'en') {
    $GLOBALS['TL_LANG']['odd']['event_more_link'] = "Details";
}

Display

How do I remove the slanted edges?

Removing the slanted edges in the header

There are already several layouts to switch between a straight and a slanted header. Among the modules there is also a navigation module with and without a slant, which you can select in the layout under the included modules.

Removing the slanted edges of content elements

The page Elements with slanted edges shows how to adjust the slanted edges of content elements. You only have to remove the classes skw-**.

Edit the module Footer / Main and remove the class skw-tr.

Removing the slanted edges of the newsletter area

For the newsletter area above the footer, edit the module Newsletter / Abonnieren / Startseite and remove the class skw-tl under Expert settings.

How do I prevent all headings from being displayed in uppercase?

Add the following CSS to custom.scss and then reload the page with Ctrl + F5:

h1, h2, h3, h4, h5, h6 {
	text-transform: inherit;
} 
How do I remove the newsletter area above the footer?

You can deactivate the newsletter area in the corresponding page layout under Included modules with the eye icon or remove it with the cross.

Other

How do I show a Google Maps map?

Install the extension Google Maps. In the back end you then find a menu item Google Maps where you can create your map.

With a content element (Media elements -> Google Map) you include the map at the desired place in an article.

You can enter the API key in the settings under Google Maps.

This is what it could look like:

How do I prevent the theme CSS file from being cached?

Visitors who have already visited the website are usually served a cached file. If you want to prevent this, you can adjust the fe_page template.

Adjust the following template: fe_bootstrap_odd.html5.

To prevent the CSS file from being cached, you can append a timestamp to the file name, for example. In the line echo $combiner->getCombinedFile(); ?>">, insert the following before the quotation marks: ?date=<?= time() ?>

It should look like this:

<link rel="stylesheet" type="text/css" media="all" href="<?php
// add stylesheets
$combiner = new Combiner();
$combiner->add('bundles/pdirthemeodd/bootstrap/dist/css/bootstrap.min.css');

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $combiner->add('bundles/pdirthemeodd/scss/odd_win.scss'); } else { $combiner->add('bundles/pdirthemeodd/scss/odd.scss'); }

echo $combiner->getCombinedFile(); ?>?date=<?= time() ?>">

Nov 9, 2026 Spare Zeit bei allen Webprojekten mit pdir+

Multidomain

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.

Note

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.

1) Create the SCSS files

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';

2) Create a template

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'); ?>">

3) Create a layout

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.

4) Assign the layout to the page

Finally, assign the layout to a page (Layout settings -> Assign a layout).

5) ODD Elements

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.

Nov 9, 2026 Spare Zeit bei allen Webprojekten mit pdir+

Update to CSS variables

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).


Requirements

  • Existing installation of the ODD theme < 3.7.0
  • Update to Contao 5

1. Update the theme

  1. Open the Contao Manager.
  2. Update the ODD theme to 3.7.0 or higher (recommended: latest version).

2. Changes to the SCSS files

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.scss

3. Create the new theme files

After 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.

Complete re-import of the theme folder

  1. In the file manager, rename the folder odd, e.g. to odd-alt.
  2. In the Contao Manager, open System maintenance → Check database and run the database update.
  3. The migration that creates the new theme files is now offered – run it.
  4. A new folder 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”.


4. Transfer your own customizations

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.

Example color variable

Before (V1 – SCSS):

$oddColor1: #b6cf92;

New (V2 – CSS variables):

:root {
  --oddColor1: #b6cf92;
}

CSS variables are used in code like this:

color: var(--oddColor1);

5. Update SCSS customizations

If your custom.scss still uses SCSS variables ($variable), change them to the CSS variable format (var(--variable)).

Example:

/* Vorher */
color: $oddColor1;

/* Neu */
color: var(--oddColor1);

Accessibility

You find detailed tips, new features from version 3.7.0 and best practices for accessible design here: ♿ Accessibility in the ODD theme


Direct download of the new variables file

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.

Nov 9, 2026 Spare Zeit bei allen Webprojekten mit pdir+

Accessibility

Accessibility in the ODD theme (version 3.7.0 and later)

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


1. New accessible templates (version 3.7.0 and later)

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).


2. General accessibility tips

When creating content, pay attention to the following:

  • Provide alternative texts (alt tags) for images
  • Use meaningful link texts (not just “click here”)
  • Mind the contrast (text color/background color)
  • Use headings in a correct hierarchy
  • Use tables only for tabular data (not for layout)
  • Give forms label elements

3. Tools for testing accessibility