- Fix template variable replacement in guide pages by removing {{}} brackets
- Escape code blocks in guide markdown to prevent template processing
- Completely rewrite guide documentation with comprehensive CMS features
- Add bilingual guide support (English/Dutch) with detailed examples
- Enhance CodePressCMS core with improved guide page handling
- Update template system with better layout and footer components
- Improve language files with additional translations
- Update configuration with enhanced theme and language settings
Resolves issue where guide pages were showing replaced template variables
instead of displaying them as documentation examples.
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
- Kopieer de
HTMLBlockmap naarplugins/ - 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 titelgetCurrentLanguage()- Huidige taalisHomepage()- Check of homepagegetCurrentPageFileInfo()- BestandsinformatiegetMenu()- Menu structuurcreateUrl($page, $lang)- URL generatie
Styling
De plugin gebruikt Bootstrap 5 classes:
card,card-header,card-bodyvoor kaartenbtn,btn-outline-primaryvoor knoppenlist-unstyledvoor 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