The design wizard's parts, one by one
This page is a reference for the What goes in it list of the design extension wizard.
<name> is the extension name you entered; the design folder has the same name. The facts below are read from the
wizard's code (kernel/setup/expdesignextensionwizard.php).
Design parts
| Part | Default | Writes | Notes |
|---|---|---|---|
| Page layout | on | design/<name>/templates/pagelayout.tpl | The frame every page is drawn inside; sets <html lang> from the siteaccess locale |
| Page parts | on | page_head.tpl, page_header.tpl, page_footer.tpl in design/<name>/templates/ | So each can be overridden on its own |
| Stylesheets | on | design/<name>/stylesheets/site.css and FrontendCSSFileList[]=site.css in settings/design.ini.append.php | The generated page_head.tpl prints the list with ezcss_load |
| Print stylesheet | off | design/<name>/stylesheets/print.css | Loaded by page_head.tpl with media="print" |
| JavaScript | on | design/<name>/javascript/site.js and FrontendJavaScriptList[]=site.js | The generated pagelayout.tpl prints the list with ezscript_load before </body> |
| Images directory | on | design/<name>/images/.gitkeep | Where ezimage looks |
| Template overrides | on | settings/override.ini.append.php with one rule, and design/<name>/override/templates/full/article.tpl | The example rule replaces node/view/full.tpl for the class article |
Three edits the generated head and layout need
From Exponential 6.0.15 on, the wizard writes a working title, prints the stylesheets and scripts and writes a plain character set, so a theme it generates needs none of these edits. A theme generated by an older wizard needs three edits by hand, or its pages have a broken title and load no stylesheets or scripts:
The title.
page_head.tplbuilds<title>withimplode_key, which is not a registered template operator. Build it with a loop over the path instead:<title>foreach $module_result.path|reverse as $item$item.text|washdelimiter / /delimiter/foreach - ezini( 'SiteSettings', 'SiteName' )|wash</title>Printing the files. The generated templates call
ezcss_requireandezscript_require, which only collect files; nothing prints them. Add{ezcss_load()}at the end ofpage_head.tpland{ezscript_load()}just before</body>inpagelayout.tpl(The ezcss and ezscript operators).The character set. Replace the generated
<meta charset=...>line, which buildsutf-8from the locale withextract_left( 0 )and works only by accident, with a plain<meta charset="utf-8" />.
Check the result: open a page of the siteaccess, view its source, and look for the page title, a <link rel="stylesheet"> for your stylesheet and a <script> element for jQuery.
settings/design.ini marks CSSFileList[] and JavaScriptList[] as deprecated in favor of
FrontendCSSFileList[] and FrontendJavaScriptList[]. From 6.0.15 on the wizard writes the newer lists, and the
generated page_head.tpl and pagelayout.tpl load both, as the shipped designs do. A theme generated by an older
wizard has CSSFileList[]=site.css and JavaScriptList[]=site.js: rename the two lines to FrontendCSSFileList[]
and FrontendJavaScriptList[], and make sure the head and the layout load the Frontend lists
(Loading stylesheets,
Loading JavaScript).
Settings parts
| Part | Default | Writes |
|---|---|---|
| Siteaccess settings | off | settings/siteaccess/<siteaccess>/site.ini.append.php with SiteDesign=<name> and AdditionalSiteDesignList[]=<base design> |
| Template operators | off | autoloads/<name>operators.php (class <name>Operators, example operator <name>_excerpt), autoloads/eztemplateautoload.php that registers it, and settings/site.ini.append.php with ExtensionAutoloadPath[]=<name> |
From 6.0.15 on the template operators part also writes autoloads/eztemplateautoload.php, the file the template
engine reads to register operators. A theme generated by an older wizard lacks it, and its operator is never
registered: add the file yourself (Template operators in a theme).
Metadata and repository parts
| Part | Default | Writes |
|---|---|---|
| ezinfo.php | on | ezinfo.php (ezinfo.php) |
| extension.xml | on | extension.xml (extension.xml) |
| composer.json | on | composer.json with name = <vendor>/<name with dashes>, type = ezpublish-legacy-extension, license, require.php = >=7.4, extra.ezpublish-legacy-extension-name and extra.installer-name = <name> |
| README.md | on | What it is, how to switch it on, what is inside |
| .gitignore | on | Keeps editor leftovers and build output out of the repository |
| LICENSE | on | The text of the license you chose |
Raise require.php in composer.json to the PHP versions you really test. From 6.0.15 on the wizard writes
extra.ezpublish-legacy-extension-name, the key the installer reads, so the package installs into extension/<name>.
A composer.json from an older wizard has only installer-name, which the installer does not read: add
"ezpublish-legacy-extension-name": "<name>" to extra (The Composer installer and the folder name).
Related pages
- The design extension wizard
- The folder structure of a theme extension
- 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.