You can design views of an app in edoc automate with a layout and embed additional content (stylesheet, JavaScript, etc.) using a layout.
You have these options:
-
Global layout for all views of an app: You can edit the layout for all views under App-Details using the Layout button.
-
Individual layout of a view: You can edit an individual view in the View tab using the Layout button.
When a view is executed, the rendered view is loaded into the layout of the view. The content is then loaded into the global layout. Layouts can therefore be nested.
With the layout of a single view, you can use html tags to prevent the view from using the global layout.
Use the {{CONTENT}} placeholder at the position in the layout where the content of the view is to be placed at runtime.
Things to know
To ensure that a view is displayed as uniformly as possible in different browsers, you must always specify <!doctype html> for html tags.
Example
<!doctype html>
<html>
<head>
<title>Start</title>
<head>
<body>
<div class="container">{{CONTENT}}</div>
</body>
</html>
Actions in layouts
The return value of an action can be displayed in layouts. You can create a new action and integrate it into the layout using the Add Action button in the layout editor.
When creating actions, you must enter a name for the action, unlike with actions on components. The name must be unique and should be kept as simple as possible.