Locked structure
In React Bricks you can lock entire pages or sections, so that it is possible to change the content, but not to change the structure of the page or section.
Lock at page-level
For each page, the Admin user can lock the page via the sidebar interface, in the Page tab.
You can also lock a page by default, setting the defaultLocked
flag in the pageType
definition.
Lock at block-level (Enterprise)
Since v3.8.0, if you have an enterprise plan, you can also lock the structure at block level. For each block, in the sidebar, you can set 4 flags to:
- Lock the block structure
- Allow the addition of new blocks before
- Allow the addition of new blocks after
- Prevent content editing (visual and via sidebar controls)
A locked block cannot be removed, moved or duplicated.
It is not possible to move a block which is below a locked block before that locked block.
It is not possible to move a block which is above a locked block below that locked block.
By default, if you don't explicitly allow the addition of blocks before/after a locked block, it is not allowed to add new blocks before/after a locked block.
Of course an Admin user can do anything, as he can (temporarily) unlock the structure of a block or of the entire page.
If the getDefaultContent
function in the pageType
definition returns IContentBlock
s or IBrickStory
s, then you can have pages that are already created with locked blocks.
In this way, for example, you can have an e-commerce product page with always a "Title" brick on top, followed by a "Product Images and Add to Cart" brick, then leave free landing page blocks creation, followed by a locked "Reviews" brick.