Overview
Page Blocks are HTML blocks that can be referenced in one or more pages. A page block can have its own layout file and contain interfaces that together represent an HTML block to be inserted into other pages.
Page blocks can be used to accelerate the assembly of pages and improve the performance of the solution.
- Speed in Assembly: As mentioned in Page Block, there are scenarios where it is possible to create multiple page templates. Page templates
are usually assembled manually, not allowing for the reuse of HTML blocks between them. Thus, the use of Page Blocks speeds up
the assembly process, as common areas can be separated into page blocks that can, in turn, be referenced in pages through
the page block service. This becomes an alternative to creating several templates.
This process is exemplified in How to build solutions with page blocks - Improve the performance of the solution: There are HTML blocks that are used in many pages of the solution. Examples of these HTML blocks are menu interfaces, search, footer, etc. Now, if your solution is configured to generate HTML cache, each time any of these blocks undergoes a change, it will be necessary to clear the entire portal's HTML cache and regenerate the pages for those changes to be reflected for the end user. This can affect the performance of the solution. Now, through the service Page Block Viewer, you can configure the common blocks to be inserted through "Server Side Include" or "Client Side Script / Ajax," allowing these blocks to be changed without the need to regenerate the HTML pages that dynamically include these blocks.