A tour of the super theme
This page is for designers who want to see the smallest complete design extension, or who have just generated one
with the design extension wizard. sevenx_themes_super on the demonstration installation is such a generated
skeleton (its settings/override.ini.append.php says "Generated by the design extension wizard"). It is not part
of the Exponential root package.
Contents
Everything it contains
extension/sevenx_themes_super/
├── composer.json, extension.xml, ezinfo.php, README.md
├── settings/design.ini.append.php DesignExtensions[]=sevenx_themes_super, CSSFileList[]=site.css, JavaScriptList[]=site.js
├── settings/override.ini.append.php one example override (full view of class article)
└── design/sevenx_themes_super/
├── templates/pagelayout.tpl the frame
├── templates/page_head.tpl meta tags, title, stylesheets
├── templates/page_header.tpl
├── templates/page_footer.tpl
├── override/templates/full/article.tpl
├── stylesheets/site.css
├── javascript/site.js
└── images/ (empty)A handful of files: enough to switch a siteaccess to the design and see a page.
How the parts fit
pagelayout.tplprints<html>, includespage_head.tplin<head>, thenpage_header.tpl, a<main>element with{$module_result.content}, andpage_footer.tpl.settings/override.ini.append.phpholds one rule:[full_article_sevenx_themes_super] Source=node/view/full.tpl MatchFile=full/article.tpl Subdir=templates Match[class_identifier]=articlewhich shows how an override replaces the full view of one class (Override basics).
The design is used by a siteaccess once its
SiteDesign(orAdditionalSiteDesignList[]) namessevenx_themes_super.
Three lines to correct
The generated head and frame need three corrections before they work as intended (reported for the wizard):
The stylesheets are never printed.
page_head.tplcalls{ezcss_require( ezini( 'StylesheetSettings', 'CSSFileList' ) )}.ezcss_requireonly queues files for a laterezcss_load, and nothing callsezcss_load. In addition,ezini()without a file name readssite.ini, notdesign.ini. Use:ezcss_load( ezini( 'StylesheetSettings', 'CSSFileList', 'design.ini' ) )jQuery and site.js are never printed for the same reason:
pagelayout.tplends with{ezscript_require( array( 'ezjsc::jquery' ) )}. Put anezscript_loadbefore</body>:ezscript_load( ezini( 'JavaScriptSettings', 'JavaScriptList', 'design.ini' ) )The title uses an operator that does not exist.
implode_keyis not a registered template operator, so the<title>line fails. Build the title with a loop instead:<title>foreach $module_result.path|reverse as $path_item$path_item.text|washdelimiter / /delimiter/foreach - ezini( 'SiteSettings', 'SiteName' )|wash</title>
While you are there, write the character set plainly: <meta charset="utf-8">.
Growing it into a real theme
- Give it a real name and your own Composer package (see the theme extension pages: Theme extensions: start here).
- Replace the frame with a pagelayout that has landmarks and a skip link (Landmarks and headings).
- Add design tokens and a dark mode to
site.css(Design tokens). - Add override rules per class and view mode (Node templates by class).
- Add translations for its strings (Tutorial: internationalize a theme).
Related pages
- Tutorial: create a theme extension
- The pagelayout
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.