Merge development v2.6.0 into main

Resolved conflicts by taking development (v2.6.0) version for all files.
Removed statistics.twig (replaced by Statistics plugin).
This commit is contained in:
2026-08-15 19:32:47 +02:00
208 changed files with 3757 additions and 23879 deletions
+10 -4
View File
@@ -3,7 +3,13 @@
## General settings
- **Site title** - Website name
- **Default language** - nl/en/de/fr
- **Author** - Name and email
- **Analytics** - Visitor tracking on/off
- **Logging** - Log files on/off
- **Admin language** - Admin panel language (nl/en/de)
- **Content language** - Default website content language (nl/en/de/fr)
## Homepage
Choose which page is shown on the homepage:
- **Automatic** - First available page
- **Most recent** - Last modified page
- **Specific page** - Select a specific page from the content directory
+14 -33
View File
@@ -2,48 +2,29 @@
## Plugin types
CodePress has two kinds of plugins, determined by the `type` field in `plugin.json`:
There are two types of plugins:
- **Content plugins** (`type: "content"`) — Appear in the sidebar and in the plugin selection on content-edit pages. Provide sidebar content via `getSidebarContent()`.
- **System plugins** (`type: "system"`) — Are loaded by PluginManager but do NOT appear in the sidebar. Provide functionality via admin menu, routes and the CMSAPI. Registered via `getAdminMenu()` and `getAdminRoutes()`.
When no `type` field is present, `content` is assumed.
- **System plugins** (blue badge) - Manage CMS functionality such as Dashboard, Logs and Statistics
- **Content plugins** (green badge) - Display content on the front-end such as HTMLBlock and Navigation
## Essential plugins
Essential plugins are defined in `getProtectedPlugins()` in `public/admin.php`. Current essential plugin: **Navigation**.
These plugins:
- Cannot be deactivated
- Cannot be edited
- Cannot be deleted
On the plugins page they get an **Essential** badge instead of the action buttons.
Essential plugins (with a shield icon) cannot be edited, deactivated, or deleted. This applies to the Navigation plugin for example.
## Managing plugins
- **Activate/Deactivate** Turn a plugin on/off (not for essential plugins)
- **Edit** Modify plugin code in CodeMirror (not for essential plugins)
- **Configuration** — Edit plugin settings
- **Delete** Remove the plugin folder (not for essential plugins)
- **Enable/Disable** - Turn plugins on/off
- **Edit** - Modify plugin code
- **Configuration** - Plugin settings (only for plugins with a Config button)
- **Delete** - Remove plugin
The admin plugins page shows a **Content** or **System** badge per plugin.
Only active plugins are shown in the admin sidebar.
## Creating a new plugin
## New plugin
1. Go to **Plugins****New plugin**
2. Enter a name (e.g. `MyPlugin`) — this becomes the folder name
3. Choose the type: **Content** or **System**
4. The file `MyPlugin.php` is created (NOT `plugin.php`)
5. Edit the plugin code in CodeMirror
6. Activate the plugin
2. Enter a name (e.g. `MyPlugin`)
3. Edit the PHP file
4. Enable the plugin
## Plugin filename
Plugin PHP files are named `<PluginName>.php` (e.g. `Navigation.php`, `HTMLBlock.php`). `PluginManager` loads `$pluginDir . '/' . $pluginName . '.php'`.
## Plugin CSS
- Content and system plugins can have their own CSS in `assets/scss/` and `assets/css/`
- Plugin CSS is automatically loaded after theme CSS (in `base.twig`), so themes can override plugin styling
- Plugin assets are served via `cms/router.php` at URL `/plugins/<Name>/assets/...`
New plugins are content-plugins by default. To create a system plugin, add `"type": "system"` to `plugin.json`.