Closed pozylon closed 6 months ago
related to https://github.com/Cockpit-HQ/Cockpit/issues/179 but it's not quite the same
a quick fix regarding the unwanted standard components:
in /config/bootstrap.php
:
<?php
$app->on('layout.components.collect', function($components) {
foreach (array_keys($components->getArrayCopy()) as $component) {
//disable specific components
if (in_array($component, ['button'])) {
unset($components[$component]);
}
}
});
For the next version I plan a setting in the pages addon for allowed components that can be used in the layout page type. Would that help you?
That is amazing, thank you!
For our needs we now had to add a "Button customized" component taking a select of "primary", "secondary" and "tertiary". Issue is we can still see the "Button" in every Layout Builder where as we don't want to allow the use of that Button, they should use "Button customized" instead.
Standard components can not be adjusted through the "Layout Components" and can't be hidden either