Skip to content

How to share the same layout between views

Layouts are yaml files stored under Metadata\Views\layouts, and by default they are searched for using a naming convention:

  • a layout called {ViewName}_List.yaml is automatically used by the Form controller to render a List view.
  • a layout called {ViewName}_Form.yaml is automatically used by the Form controller to render a Form view.

But, if you need to use a specify a layout in a View implement the MainTable/Controller/Grid/Layout or the MainTable/Controller/Form/layout parameters

For example:

yaml
MainTable:
...
  Controller:
...
    Form:
      Layout: XXXX_Form
    Grid:
      Layout: YYYY_Grid

You can also specify a layout for **details **implementing the MainTable/DetailTables/Table/Controller/Grid/Layout or the MainTable/DetailTables/Table/Controller/Form/layout parameters.

yaml
MainTable:
...
  DetailTables:
    Table:
      Controller:
        Form:
          Layout: ZZZZ_Form

Released under Apache License, Version 2.0.