Basic Layouts are used to define the generic structure of a panel created with K2BTools. A Basic Layout is a Panel where the "Is Layout" property is set to "True".
Several types of these layouts exist, to accomodate different generated object types (WorkWith, EntityManager, panels generated using K2BWebPanelDesigner, etc). The "Layout Type" property is used to distinguish among these types.
A particular layout can implement an Abstract Layout Editor (Responsive interface), or an HTML Editor (for Previous Version compatible interfaces). Commonly in a KB both types of layouts exist, so that the developer can choose in each case which kind of layout should be used depending on the Web Form Generator used in each instance.
To work with basic layouts some rules must be followed. In simple terms, the layout's form must always contain some components, that are replaced by K2BTools to create the final objects.
To customize a layout, we recommend creating a copy of one of the layouts provided by K2BTools and working on the copy. After doing so, the developer can go to the K2BWebPanelDesignerSettings or K2BEntityServices Settings objects and set the new object as the default layout for the entire KB, or set the new layout in specific objects that should be created using it.
The components necessary depend on the interface related to the layout, and the Web Form Generator Used.
Code added to the layout object is copied to the generated panel. The developer may use slots to restrict that process based on conditions.
For example, the developer can add slots to copy code only when certain types of filters are present. See more in: Customizing filters UI in Basic Layout objects.
The developer can also add slots to copy blocks of code only when a certain action region is not empty, as shown below.
DownloadActionsTable.Visible = false
In this sample, the line in grey will only be included when the DownloadsSection region is not empty.
Possible slots are: