I'm trying to create a locked CMS layout while installing the plugin, but it's not creating a locked layout. Here is the code,
$page = [
[
'id' => Uuid::randomHex(),
'type' => 'page',
'name' => 'Test',
'locked' => 1,
'sections' => [
[
'id' => Uuid::randomHex(),
'type' => 'default',
'locked' => 1,
'position' => 0,
'blocks' => [
[
'locked' => 1,
'position' => 0,
'type' => 'image-cover',
'slots' => [
['type' => 'image', 'locked' => 1, 'slot' => 'image']
]
]
]
]
]
]
];
Is there something that I'm missing?
Just to be clear that cms_page
doesn't has locked
property, but there is only a database column to set the locked layout. So you need to add it while migration or alter the table after creating a particular layout.