Design Web Blocks with content that is reused in Web Screens (or even other Web Blocks) to improve reusability and maintainability. For example, use Web Blocks to design screen headers, menus, and footers.
To create a Web Block:
Web Blocks are designed in the Web Screen Editor, just like a Web Screen. In the case of Web Blocks the editor has an additional widget called the Placeholder.
Regarding the Web Block logic, you can use the following elements:
It is important that the Web Block design is self-contained, since they are evaluated independently from the place where they are being used.
There are some design particularities with Web Blocks regarding Web Screens:
Web Blocks can be used inside other Web Blocks, which is called nested Web Blocks. However, be extra careful with loops that might occur if one web block is including a preceding web block. This leads to an endless loop because the web block build process will keep turning back.
When a loop is detected at design time, the preview of the offending web block will be stopped and a "Block loop detected in block '<block>'" error message is displayed inside the web block.
Like Web Screens, the Web Block Preparation is automatically executed before each Web Block is rendered. Therefore, you don't have to explicitly invoke it.
When the Web Block is refreshed using Ajax, the Web Block Preparation is executed.
When a web block is rendered, each web blocks inside it are rendered in the following way:
When an End element is used in a screen action, the web block's current execution context is kept the same way the screen is.
About Web Blocks | Change a Web Block