Disable fields on a child page from parent toggle field?

Hi, is there a way to disable all fields on a child page based on a toggle field (or end date field) from a parent ?
Many thanks !

If you have a fixed parent page that you can access via the page() helper, you could create the child blueprint programmatically instead of as a yml blueprint and set the update option in the page options to false depending on that parent page field.

Thanks @texnixe !
Great way these programmable blueprints !
But how to get parent page fields please ? This way on child ?

options:
	update:
		admin: true
		user: "{{ page.parent.toggle_editable_fields }}"

Well you have to do it in PHP! And you cannot use parent! As I already wrote, it will only work if you can fetch the parent page by its ID, e.g. page('blog')->toggle_editable_field()->toBool()

Works quite well with this method @texnixe !

$options = [];
$toggle_status = page('my-page')->toggle_editable_fields()->toBool();
return [
	'update' => [
		'admin' => true,
		'user' => $toggle_status
	],
];

I just wonder if there is no way (with a hidden field for example) to automate all this? Without having to enter the page name manually?

You don’t have access to the current page in these PHP blueprints, if that’s what you mean. Nor can you use query language for these options in your yaml blueprint.