# Create a page layout

Source: https://zotonic.com/docs/2942/create-a-page-layout

URI: https://zotonic.com/id/2942

Language: en

Use an existing site base template as your starting point. Put shared document structure in the base and page-specific markup in blocks.

```django
{% extends "base.tpl" %}
{% block content %}
<main>
    <h1>{_ Our garden _}</h1>
    <p>{_ Find out what is growing this week. _}</p>
</main>
{% endblock %}
```

Check which blocks your chosen base provides before overriding one. Keep the standard head and body includes so active modules can contribute scripts, styles, metadata, and browser initialization. In a custom base, use <a href="/id/1355" class="doc-reference doc-reference-tag"><code>tag#all_include</code></a> with the standard include names instead of copying module-specific head fragments.

In a custom base, put `{% all include "_html_head.tpl" %}` inside `<head>`. Near the end of `<body>`, keep `{% all include "_html_body.tpl" %}`, the site's `_js_include.tpl`, and one final `{% script %}` in their established order. Wires collect browser code for that final script tag; without it a page can render correctly while its buttons do nothing.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2942?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2942?language=en>)
