Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,110 of 9,110 pages
About the help in other languages
All help pages

Your own design extension

Set up a small design extension (here "mysite") next to a theme, activate it in the right order, and override any template of the theme or of Layouts without touching their files. Every step tested on a copy of the Fit…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/build-two-ways/your-own-design-extension.md

On this page

Your own design extension

The template way of building starts with an extension of your own. It holds your templates, settings and stylesheets, lives in its own git repository, and changes the site without editing the theme (sevenx_themes_media) or the Layouts extensions, so their updates never overwrite your work. These pages call it mysite.

Contents

  1. The files
  2. Activate it, in the right place
  3. Override a template
  4. Clear the caches
  5. Check which file is used

The files

extension/mysite/
    settings/
        design.ini.append.php                      registers the design extension
        menu.ini.append.php, explayouts.ini.append.php ...   your settings
    design/
        media/                                     the design the site uses (SiteDesign of the siteaccess)
            templates/                             same paths as the templates you replace
            stylesheets/                           your CSS

settings/design.ini.append.php:

<?php /* #?ini charset="utf-8"?

[ExtensionSettings]
DesignExtensions[]=mysite

*/ ?>

The folder under design/ must be the design the siteaccess uses: media for the Fit & Healthy site. Templates in design/standard/ would be found for every design, after the site's own design.

Activate it, in the right place

Add mysite to [ExtensionSettings] ActiveExtensions[] of site.ini (Setup > Ini settings, or ./console exp:ini add site.ini/ExtensionSettings/ActiveExtensions[] mysite global). The position matters. What was measured on the test copy:

mysite in ActiveExtensions[]DesignExtensions[] in effectResult
appended at the end (what exp:ini add does)mysite listed before sevenx_themes_mediathe theme's templates win; the override is ignored
placed before sevenx_themes_mediamysite listed after the themeyour templates win
placed firstmysite listed lastyour templates win

The rule behind it: the extensions are read in the reverse order of ActiveExtensions[], and in DesignExtensions[] the last one listed wins. So an extension listed earlier in ActiveExtensions[] wins over the ones after it. exp:ini add appends; to put the line first, edit the list in Setup > Ini settings (one =name per line, in order) or in the file.

Override a template

Copy the template you want to change from the theme to the same path in your extension, then change your copy. For the header menu, for example:

extension/sevenx_themes_media/design/media/templates/pagelayout/header/main_menu.tpl     (the theme's)
extension/mysite/design/media/templates/pagelayout/header/main_menu.tpl                  (yours, wins)

The same works for every block template of Layouts, for example extension/mysite/design/media/templates/explayouts/block/list/grid.tpl replaces the List block's grid view (How a block maps to its templates).

Clear the caches

A new template file needs the override list rebuilt: clear Template & content (./console exp:cache clear --tag=template,content). After changing ActiveExtensions[], clear the INI caches too (--tag=template,content,ini).

Check which file is used

./console exp:ini get design.ini/ExtensionSettings/DesignExtensions -s site     # mysite must come after the theme

In the page's HTML your markup shows. The administration's Quick settings (right column) have List of used templates and Template debug for a closer look.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x