---
title: Layouts
project: OpenTemplates
version: 1.0
section: guides
language: de
license: MIT
url: https://totaljs.es/docs/de/opentemplates/1-0/guides/layouts/
updated: 2026-11-19T07:56:18.767Z
---

# Layouts

> Bearbeite die HTML-Seite, die jede Vorlage eines Profils umgibt.

Jedes Profil hat ein Layout. Das Layout ist eine vollständige HTML-Seite, und jede Vorlage des Profils wird darin gerendert. Leg die Styles, Schriften und Helfer, die alle deine Dokumente teilen, ins Layout.

## Das Layout bearbeiten

**1.** Klick auf der Seite **Profiles** auf das Zahnrad des Profils.

**2.** Klick auf **Update template**.

**3.** Bearbeite links das HTML. Rechts siehst du eine Vorschau.

![Der Layout-Editor](/files/JapW2N4tY60f.webp)

**4.** Klick auf **SUBMIT**, um zu speichern.

## Das Standard-Layout

Ein neues Profil beginnt mit diesem Layout:

```html
<!DOCTYPE html>
<html>
<head>
	<title>OpenTemplates</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<style>
	{{ if $.preview }}
		body { background: #F0F0F0; padding: 15px; font-family: Arial; font-size: 14px; color: #000; }
		page { background: #FFF; display: block; margin: 0 auto; margin-bottom: 0.5cm; box-shadow: 0 0 20px #D0D0D0; width: 21cm; min-height: 29.7cm; }
	{{ else }}
		body, page { padding: 0; margin: 0; box-shadow: 0; background: #FFF; }
	{{ fi }}
	</style>
</head>
<body>

	<page>
		{{ value | raw }}
	</page>

	<script>

		// Custom helpers

		Thelpers.amount = function(val) {
			return val.format(2) + ' &euro';
		};

	</script>

</body>
</html>
```

Drei Teile sind wichtig:

- `{{ value | raw }}` ist die Stelle, an der die gerenderte Vorlage landet. Behalte es in jedem Layout.
- `{{ if $.preview }}` ist nur in der Vorschau des Editors wahr. Das Standard-Layout nutzt es, um im Editor ein A4-Blatt auf grauem Hintergrund zu zeigen und im echten Ergebnis eine schlichte weiße Seite.
- Der `<script>`-Block enthält Helfer. Helfer, die im Layout festgelegt sind, funktionieren in jeder Vorlage des Profils. Siehe [Vorlagen-Syntax](../template-syntax/).

Der Standard-Helfer `amount` schreibt `&euro` ohne das abschließende Semikolon. Ändere es in `' &euro;'`, wenn du ihn nutzt.
