> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemreference/wmt/basic-functional-template.md).

# Basic Functional Template

A basic functional template file (`mastertemplate.bwmt`) without any layout or styling consists of the following mandatory template parts: `<% CommonScripts %>`, `<% Content %>`, `<% HiddenFormFields %>`, and `<% StartupScripts %>`. Most applications cannot function properly without `<% Navigation main %>`, `<% ButtonBarButtons left %>`, and `<% ButtonBarButtons right %>`.

Putting it all together, you will get something like the example below:

```html
<!doctype html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>My WEM Application</title>
        <% CommonScripts %>
    </head>
    <body>
        <% Navigation main %>
        
        <form method="post" enctype="multipart/form-data">
            <% Content %>
            <% HiddenFormFields %>
        </form>

        <% ButtonBarButtons left %>
        <% ButtonBarButtons right %>
        
        <% StartupScripts %>
    </body>
</html>
```

{% hint style="info" %}
Using the code above will give your WEM application a very basic retro appearance, as there are no layout or styles added to it.
{% endhint %}

### Postback

As shown in the basic template above, to perform a proper postback, the `<% Content %>` and `<% HiddenFormFields %>` should be placed inside a `<form>` block with the attribute `enctype="multipart/form-data"` as follows:

```html
<form method="post" enctype="multipart/form-data">
    <% Content %>
    <% HiddenFormFields %>
</form>
```

### Remarks

Refer to the WMT reference for more details about the template parts and additional elements that can be used in design templates.


---

# 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:

```
GET https://docs.wem.io/platform/wemreference/wmt/basic-functional-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
