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:

<!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>

Using the code above will give your WEM application a very basic retro appearance, as there are no layout or styles added to it.

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:

<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.

Last updated

Was this helpful?