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

Tutorial: port a static HTML design

Turn a static HTML/CSS mockup or an agency's templates into an Exponential design: split the page into pagelayout and parts, move assets into the design folders, replace fixed texts and links with template code, map…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/theme-design/tutorial-port-a-static-html-design.md

On this page

Tutorial: port a static HTML design

This tutorial is for designers who received static HTML pages (from an agency, a style guide or a purchased template) and must turn them into a working Exponential design. Allow a day for a typical site of five page types.

Contents

  1. Step 1: inventory
  2. Step 2: assets into the design
  3. Step 3: the frame becomes the pagelayout
  4. Step 4: page types become view templates
  5. Step 5: fixed content becomes template code
  6. Step 6: clean up on the way

Step 1: inventory

List the page types of the mockup and map each to Exponential:

Mockup pageBecomes
frame (header, menu, footer)pagelayout.tpl and parts
home pagefull view of the front page class, or a layout (Layouts for designers)
articlefull view override for class article
list of articlesfull view of folder with a line view per item
contact formfull view of the feedback form class
search resultscontent/search.tpl

Step 2: assets into the design

mockup/css/*.css     ->  design/mytheme/stylesheets/
mockup/js/*.js       ->  design/mytheme/javascript/
mockup/img/*         ->  design/mytheme/images/
mockup/fonts/*       ->  design/mytheme/fonts/

Fix relative url() paths in the CSS (../images/..., ../fonts/...). Load the CSS with one ezcss_load and the scripts with ezscript_load (Loading stylesheets). Replace a CDN link to a library with a local copy (External resources and CDNs).

Step 3: the frame becomes the pagelayout

Take the mockup's common frame; replace the content area with {$module_result.content}; split header, footer and menu into pagelayout/*.tpl parts (The pagelayout). Replace:

MockupTemplate
<html lang="en"><html lang="{$site.http_equiv.Content-language|wash}">
<title>Site</title>a title from the page's path and $site.title
href="index.html"href={'/'|ezurl}
src="img/logo.svg"src={'logo.svg'|ezimage}
a fixed menua fetch of the root's children (Menus and navigation)

Step 4: page types become view templates

For each content page type, an override with its own template (Tutorial: override a full view). Paste the mockup's markup and replace the dummy texts with fields:

<h1>{$node.name|wash}</h1>
<div class="lead">{attribute_view_gui attribute=$node.data_map.intro}</div>

Step 5: fixed content becomes template code

  • Lorem ipsum becomes fields of the content.
  • Repeated items (cards, teasers) become a {foreach} over a fetch and a line view.
  • Interface texts ("Read more", "Search") go through i18n.
  • Dates through l10n.

Step 6: clean up on the way

Static templates often carry habits that do not survive in Exponential:

  • inline <style>, style="", onclick="" and inline scripts: move them into files (CSP-safe design);
  • missing alt, skipped headings, a div used as a button: fix them now (Accessibility basics for themes);
  • fixed colors: turn them into tokens, which gives you dark mode later (Design tokens);
  • left/right in CSS: logical properties, for right-to-left languages.

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