v2.6.1d (Lyra): Plugin i18n, plugin editor vernieuwd, media invoegen
Plugin internationalisatie: plugins hebben eigen language/ mappen. Systeem plugins volgen admin taal (admin.php), content plugins volgen content taal (site.php). Fallback chain: geselecteerd -> plugin default_language -> CMS default. PluginManager/AdminPluginAPI/CMSAPI uitgebreid met getPluginTranslations()/t(). plugin.json settings ondersteunen label_key/help_key/option_label_key. Plugin uniformiteit: alle 6 plugins hebben uniforme structuur (README.md, assets/.gitkeep, language/nl|en/). plugins/README.md herschreven. guide plugin-development.md (NL+EN) volledig herschreven. Plugin editor vernieuwd: geneste bestandsbrowser zijbalk, nieuw bestand aanmaken, uploaden naar assets/, verwijderen en verplaatsen. Nieuwe routes: plugins-file-upload, plugins-file-delete, plugins-file-move. Path-traversal bescherming + protected plugins geblokkeerd. Media invoegen in editor: nieuw /admin/media-list JSON endpoint + herbruikbare _media-modal.twig include. Plugin-context scant assets/ map. editor-toolbar.js modeMap uitgebreid voor css/scss/js/json. Plugin overzicht knoppen: alleen iconen met title/aria-label. Tests: pentest 30/30, WCAG 2.1 AA 25/25.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Navigation Plugin
|
||||
|
||||
Essentiële content plugin die navigatie toont voor handleidingen en content in de sidebar.
|
||||
|
||||
## Plugin type
|
||||
|
||||
**Content** plugin. De plugin-output volgt de geselecteerde **content taal** (via `CMSAPI::getPluginTranslations()` met `site.php`).
|
||||
|
||||
## Bestandsstructuur
|
||||
|
||||
```
|
||||
Navigation/
|
||||
├── Navigation.php # Hoofd plugin class
|
||||
├── plugin.json # Plugin metadata + instellingen
|
||||
├── README.md # Dit bestand
|
||||
├── assets/ # CSS/SCSS voor navigatie
|
||||
│ ├── css/navigation.css
|
||||
│ └── scss/navigation.scss
|
||||
└── language/ # Vertalingen
|
||||
├── nl/site.php # Nederlandse front-end labels
|
||||
└── en/site.php # Engelse front-end labels
|
||||
```
|
||||
|
||||
## Functies
|
||||
|
||||
- **Content navigatie**: Bouwt een sidebar navigatie uit de content-mapstructuur
|
||||
- **Handleiding navigatie**: Bouwt een sidebar navigatie uit de guide-mapstructuur
|
||||
- Detecteert automatisch of de huidige pagina een handleiding of content pagina is
|
||||
- Toont mappen (met kinderen) en bestanden (.md, .php, .html)
|
||||
- Strip taal-prefixen uit bestandsnamen (bijv. `nl.pagina.md` → `Pagina`)
|
||||
|
||||
## Instellingen
|
||||
|
||||
Deze plugin heeft geen instelbare configuratie (`hasConfig: false`). Wel levert hij een CSS-URL via `getCssUrl()`.
|
||||
|
||||
## Taal support
|
||||
|
||||
De plugin-output bestaat voornamelijk uit bestands- en mapnamen (die uit de content zelf komen), dus er zijn weinig te vertalen UI-strings. De `language/<lang>/site.php` bestanden bevatten momenteel alleen `plugin_title` voor uniformiteit met de andere plugins en toekomstige uitbreiding.
|
||||
|
||||
De plugin gebruikt `CMSAPI::getPluginTranslations('Navigation')` om labels op te halen. Fallback chain:
|
||||
1. Geselecteerde content taal
|
||||
2. Plugin `default_language` (`nl`)
|
||||
3. Lege array (sleutel wordt ongewijzigd getoond)
|
||||
|
||||
## Beschermd
|
||||
|
||||
Deze plugin is **protected**: hardcoded in `public/admin.php` (`getProtectedPlugins()`) en kan niet worden uitgeschakeld, verwijderd of bewerkt via de admin interface.
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
// Navigation is a content plugin. Its sidebar output is built from file and
|
||||
// directory names, so there are very few translatable UI strings. This file
|
||||
// exists for uniformity with the other plugins and to allow future labels.
|
||||
return [
|
||||
'plugin_title' => 'Navigation',
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
// Navigation is a content plugin. Its sidebar output is built from file and
|
||||
// directory names, so there are very few translatable UI strings. This file
|
||||
// exists for uniformity with the other plugins and to allow future labels.
|
||||
return [
|
||||
'plugin_title' => 'Navigatie',
|
||||
];
|
||||
@@ -5,5 +5,7 @@
|
||||
"description": "Essentiële navigatie plugin voor handleidingen en content",
|
||||
"type": "content",
|
||||
"essential": true,
|
||||
"hasConfig": false
|
||||
"hasConfig": false,
|
||||
"default_language": "nl",
|
||||
"settings": []
|
||||
}
|
||||
Reference in New Issue
Block a user