Pressworks

Templates / FreeMarker

FreeMarker templates

Designed page sets written in FreeMarker, with real list and if directives. Copy a folder into your app, hand it one model, and every page renders with your data.

What the FreeMarker edition looks like

relaybird/invoices.ftlhFreeMarker
<#list invoices as i>
  <tr class="invoice-row">
    <td class="col-number"><a class="invoice-link" href="${i.url}">${i.number}</a></td>
    <td class="col-date">${i.date}</td>
    <td class="col-for">${i.description}</td>
    <td class="col-status"><span class="status<#if i.statusClass?has_content> ${i.statusClass}</#if>">${i.status}</span></td>
    <td class="col-amount"><span class="money">${i.amount}</span></td>
    <td class="col-pdf"><a class="text-link text-link-plain">Download<span class="visually-hidden"> <span>${i.number}</span> as PDF</span></a></td>
  </tr>
</#list>

Relaybird's invoice rows, exactly as the FreeMarker edition ships them. The loop is a list directive, and the status class is added by an if directive only when there is one to add.

Every page in every template is written this way. None of it is static markup with a file extension changed.

Putting it in your app

Where it goes

Pages end in .ftlh, so FreeMarker escapes them as HTML. They go in src/main/resources/templates/, in a folder named for the template. The stylesheet and images go in static/.

What it reads

Maps, not records. Each template's model has an asMap() method that hands over exactly the shape the pages expect.

The rule that bites

Never pass null. FreeMarker stops on a missing value, so pass an empty string or list instead. Pass numbers as text too, or FreeMarker formats them for the reader's locale.

Every template in FreeMarker

14 so far, and new ones land every month. Each download has every format, so you can change engines later without purchasing again.

Tern

$29.99

Marketing site

The marketing site for a software product, with the product doing the selling.

20 pages · 4 formats · v1.0.0

View template

Missive

$29.99

Documentation

The documentation site for a library, with versions, search and a wide reference.

18 pages · 4 formats · v1.0.0

View template

Small Batch

$29.99

Podcast

The website of a weekly interview podcast, with a player on every episode.

20 pages · 4 formats · v1.0.0

View template

Carton

$29.99

Documentation

The API reference developers keep open while they write code against yours.

20 pages · 4 formats · v1.0.0

View template

Night Desk

$29.99

Personal website

A developer's own website, as paper on a desk under a lamp.

20 pages · 4 formats · v1.0.0

View template

Fork Join

$29.99

Personal website

The personal site of one developer, printed in two inks: projects, talks, writing and a way to hire them.

20 pages · 4 formats · v1.0.0

View template

Podium

$29.99

Conference

The website of a three-day developer conference, from the schedule to the organizer's dashboard.

27 pages · 4 formats · v1.0.0

View template

Rapids

$29.99

Conference

The website of a developer conference: two tracks, speakers, tickets and a call for papers.

20 pages · 4 formats · v1.0.0

View template

Small Machines

$29.99

Blog and changelog

A playful blog dressed as an old desktop: every post a window, every topic a folder.

20 pages · 4 formats · v1.0.0

View template

Veriport

Free with an account

Admin dashboard

A complete admin surface for the internal tools nobody volunteers to build.

36 pages · 4 formats · v1.1.3

View template

Oxbow

Free with an account

Online shop

A coffee shop from the shelf to the doorstep, for whatever you sell.

20 pages · 4 formats · v1.0.0

View template

Fairday

Free with an account

Marketing site

The public website of a small software company, from the home page to the terms.

19 pages · 4 formats · v1.0.0

View template

Relaybird

$29.99

Account and billing

The account and billing pages your customers see after they sign in.

23 pages · 4 formats · v1.0.0

View template

Longhand

Free with an account

Blog and changelog

A blog for one writer and the odd guest, built for long posts and code.

18 pages · 4 formats · v1.0.0

View template

The same pages in every engine

Each template is written out in Thymeleaf, FreeMarker, JTE and plain HTML. Every edition is installed from its own download into a fresh app, and every page, link and button is tried there before it goes on sale. Java 17 or later.

Thymeleaf templates JTE templates Which format should I take?