Files
CodePress/plugins/HTMLBlock
E.Noorlander 1492dcf71f v2.6.0: Content backup/git versioning, plugin type system, docs update
New features:
- ContentBackup class with ZIP backup/restore and git versioning
- Admin backup & restore page (content-backup.twig) with git init/commit/log/restore
- Plugin type system: system (blue) vs content (green) with visual badges
- PluginAPIInterface + AdminPluginAPI for plugin architecture
- Essential plugin flag (cannot edit/deactivate/delete)

Improvements:
- Consolidated enabled_plugins config (removed plugins.enabled)
- Removed Analytics/Logging toggles from admin config page
- Fixed Dashboard plugin Twig comments rendered as text
- Updated 20 guide files (NL+EN): configuratie, plugins, plugin-development,
  core-classes, theme-json, layouts, scss-styling, admin-beheerder, nieuw-thema, architectuur
- Improved accessibility test script (grep -E, min/max checks)

Cleanup:
- Removed unused classes: ARIAComponents, AccessibilityManager, ContentSecurityPolicy, etc.
- Removed vendor packages: mustache/mustache, php-mqtt/client
- Removed old templates: logs.twig, statistics.twig (now plugins)
- Moved language files to language/ directory

Tests:
- Pentest: 30/30 passed, 0 vulnerabilities
- WCAG 2.1 AA: 25/25 passed, 100% compliance
2026-08-15 19:21:04 +02:00
..

HTMLBlock Plugin

Deze plugin toont een custom HTML blok in de sidebar met pagina-informatie en navigatie.

Functies

  • Pagina informatie: Toont huidige pagina titel en metadata
  • Bestandsinfo: Aanmaak- en wijzigingsdatums
  • Dynamische navigatie: Genereert quick links uit het menu
  • Interactive controls: Verversen en sidebar toggle
  • Responsive: Werkt op desktop en mobiel

Installatie

  1. Kopieer de HTMLBlock map naar plugins/
  2. De plugin wordt automatisch geladen

Gebruik

De plugin wordt automatisch in de sidebar geladen en toont:

Huidige Pagina Info

  • Pagina titel
  • Huidige taal
  • Homepage status

Bestandsinformatie

  • Aanmaakdatum
  • Laatste wijziging
  • Bestandsgrootte

Quick Navigation

  • Dynamische links uit het CMS menu
  • Automatische URL generatie

Interactive Controls

  • Ververs Content: Herlaadt de huidige pagina
  • Toggle Sidebar: Toont/verbergt de sidebar

Customization

De plugin content kan worden aangepast door de getSidebarContent() methode te wijzigen in HTMLBlock.php.

Voorbeeld Custom Content

public function getSidebarContent(): string
{
    $currentPage = $this->api ? $this->api->getCurrentPageTitle() : 'Onbekend';
    
    return '
        <div class="card">
            <div class="card-body">
                <h5>Mijn Custom Block</h5>
                <p>Huidige pagina: ' . htmlspecialchars($currentPage) . '</p>
            </div>
        </div>';
}

API Integration

De plugin maakt gebruik van de CMS API voor:

  • getCurrentPageTitle() - Huidige pagina titel
  • getCurrentLanguage() - Huidige taal
  • isHomepage() - Check of homepage
  • getCurrentPageFileInfo() - Bestandsinformatie
  • getMenu() - Menu structuur
  • createUrl($page, $lang) - URL generatie

Styling

De plugin gebruikt Bootstrap 5 classes:

  • card, card-header, card-body voor kaarten
  • btn, btn-outline-primary voor knoppen
  • list-unstyled voor navigatie

JavaScript

De plugin bevat JavaScript voor:

  • Pagina verversen
  • Sidebar toggle functionaliteit
  • Dynamische content updates

Development

De plugin is een goed voorbeeld voor:

  • API integratie
  • Dynamic content generatie
  • User interface components
  • Responsive design

Bestandsstructuur

HTMLBlock/
├── HTMLBlock.php    # Hoofd plugin bestand
└── README.md        # Deze documentatie