Plugin system: content vs system types, sidebar-aware UI, arrow visibility
- plugin.json type field: 'content' (sidebar) or 'system' (API only) - Content-edit: label 'Plugins', hide section if layout has no sidebar - Content-edit: disable checkboxes when no sidebar layout selected - Content-edit: hide up arrow on first item, down arrow on last item - PluginManager: isPluginViewable() checks type=system -> not viewable - Admin plugins page: show Content/Systeem type badge - HTMLBlock: add plugin.json with type=content - Navigation: add type=content to config
This commit is contained in:
@@ -132,7 +132,13 @@ class PluginManager
|
||||
{
|
||||
if (method_exists($plugin, 'getConfig')) {
|
||||
$config = $plugin->getConfig();
|
||||
return !isset($config['viewable']) || $config['viewable'] !== false;
|
||||
if (isset($config['viewable']) && $config['viewable'] === false) {
|
||||
return false;
|
||||
}
|
||||
// System plugins don't show in sidebar
|
||||
if (isset($config['type']) && $config['type'] === 'system') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user