> For the complete documentation index, see [llms.txt](https://docs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akinon.com/technical-guides/project-zero/django/page-types/static-pages-and-flatpages.md).

# Static Pages & Flatpages

Static pages are templates with a direct link configured via Omnitron and content, also managed via Omnitron. They are also called "flatpages", hence their folder in project is `templates/flatpages`. For consistency, this document will use the name `flatpages`.

Since flatpages are managed via Omnitron, they get some attributes by default to use the information from Omnitron. These attributes are `title` and `content`, which is used in templates as `{{ flatpage.title }}` and `{{ flatpage.content }}` respectively.

```
<section class="flatpage">
  <h1>{{ flatpage.title }}</h1>
  {% autoescape false %}
    {{ flatpage.content }}
  {% endautoescape %}
</section>
```

## <mark style="color:red;">Base Layout Extend​</mark> <a href="#base-layout-extend" id="base-layout-extend"></a>

Flatpages may or may not use the general design of the website, depending on their designs. If they do, they need to be extended from the base layout as usual.

```
{% extends 'layout/base.html' %}
```

If they have a different design, e.g. without header or footer, then you might not want to do this.

## <mark style="color:red;">Forms</mark>​ <a href="#forms" id="forms"></a>

It is possible to use forms in flatpages. The most commonly used form is the "contact us" form.

This form usually co-exists in account pages. In that case, the form in `/templates/account/contact` can be used in your flatpage with a Jinja2 `include`. Have a JS file which creates an instance of `AccountContact` class, add it to `/templates/layout/router.js` if it doesn't already exist and your contact form is ready to use.

```
{% include 'account/contact/index.html' %}
```

## <mark style="color:red;">Widgets</mark>​ <a href="#widgets" id="widgets"></a>

It is also possible to use widgets in flatpages. Please refer to widgets [documentation](/technical-guides/project-zero/django/widgets.md) for more information.

## <mark style="color:red;">3rd Party Tools​</mark> <a href="#id-3rd-party-tools" id="id-3rd-party-tools"></a>

Some projects might want to use 3rd party tools. In that case, an empty flatpage is created with only flatpage content.

```
{% autoescape false %}
  {{flatpage.content}}
{% endautoescape %}
```

Then, one can create a new page via Omnitron, use this template file and inject the tool they want via the content area.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.akinon.com/technical-guides/project-zero/django/page-types/static-pages-and-flatpages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
