Twig templates
Basis syntax
base.twig voorbeeld
Variabelen beschikbaar in templates
Pagina data
| Variabele |
Type |
Beschrijving |
page_title |
string |
Titel van huidige pagina (HTML-escaped) |
content |
string |
Ge-renderde pagina content (HTML) |
page_metadata |
array |
Frontmatter metadata van de pagina |
layout |
string |
Layout naam (bijv. full_content) |
sidebar_content |
string |
Sidebar content van plugins (HTML) |
breadcrumb |
string |
Breadcrumb HTML (gegeneerd door CMS) |
Site data
| Variabele |
Type |
Beschrijving |
site_title |
string |
Site titel uit config.json |
default_page |
string |
Standaard pagina pad |
homepage |
string |
Homepage pad |
homepage_title |
string |
Homepage titel |
is_homepage |
bool |
Of huidige pagina de homepage is |
is_guide_page |
bool |
Of huidige pagina een handleiding is |
has_content |
bool |
Of content map niet leeg is |
cms_version |
string |
CMS versie nummer |
| Variabele |
Type |
Beschrijving |
menu |
string |
Ge-renderd menu HTML |
current_page |
string |
Huidige pagina pad |
breadcrumb |
string |
Breadcrumb HTML |
Taal
| Variabele |
Type |
Beschrijving |
current_lang |
string |
Huidige taal code (bijv. nl) |
current_lang_upper |
string |
Huidige taal in hoofdletters |
available_langs |
array |
Beschikbare talen met code, name, url, is_current |
SEO
| Variabele |
Type |
Beschrijving |
seo_description |
string |
SEO beschrijving |
seo_keywords |
string |
SEO keywords |
block_ai_bots |
bool |
AI bots blokkeren |
block_search_engines |
bool |
Zoekmachines blokkeren |
Auteur
| Variabele |
Type |
Beschrijving |
author_name |
string |
Auteur naam |
author_website |
string |
Auteur website URL |
author_git |
string |
Auteur Git URL |
Theme
| Variabele |
Type |
Beschrijving |
theme_title |
string |
Thema titel |
theme_css_url |
string |
Gecompileerde CSS URL |
theme_js_url |
string |
JavaScript URL |
theme_config |
array |
Thema configuratie uit theme.json |
theme_base_url |
string |
Basis URL van thema (bijv. /themes/default) |
theme_css_files |
array |
Lijst van CSS bestanden |
theme_js_files |
array |
Lijst van JS bestanden |
theme_favicon |
string |
Favicon URL |
plugin_css_urls |
array |
CSS URLs van plugins (geladen ná theme CSS) |
Theme kleuren
| Variabele |
Type |
Beschrijving |
header_color |
string |
Header achtergrondkleur |
header_font_color |
string |
Header tekstkleur |
header_height |
string |
Header hoogte in px |
navigation_color |
string |
Navigatie achtergrondkleur |
navigation_font_color |
string |
Navigatie tekstkleur |
nav_height |
string |
Navigatie hoogte in px |
sidebar_background |
string |
Sidebar achtergrondkleur |
sidebar_border |
string |
Sidebar randkleur |
Bestandsinfo
| Variabele |
Type |
Beschrijving |
created |
string |
Aanmaakdatum van bestand |
modified |
string |
Wijzigingsdatum van bestand |
show_created |
bool |
Of aanmaakdatum getoond moet worden |
file_info_block |
bool |
Of bestandsinfo blok getoond moet worden |
Vertalingen
| Variabele |
Type |
Beschrijving |
t_home |
string |
"Home" vertaling |
t_search |
string |
"Zoeken" vertaling |
t_search_placeholder |
string |
Zoekbalk placeholder vertaling |
t_search_button |
string |
Zoekknop vertaling |
t_welcome |
string |
"Welkom" vertaling |
t_created |
string |
"Aangemaakt" vertaling |
t_modified |
string |
"Gewijzigd" vertaling |
t_author |
string |
"Auteur" vertaling |
t_manual |
string |
"Handleiding" vertaling |
t_guide |
string |
"Handleiding" vertaling |
t_no_content |
string |
"Geen content" vertaling |
t_no_results |
string |
"Geen resultaten" vertaling |
t_results_found |
string |
"Resultaten gevonden" vertaling |
t_powered_by |
string |
"Aangedreven door" vertaling |
t_page_not_found |
string |
"Pagina niet gevonden" vertaling |
t_page_not_found_text |
string |
"Pagina niet gevonden" tekst vertaling |
t_mappen |
string |
"Mappen" vertaling |
t_paginas |
string |
"Pagina's" vertaling |
Layouts en blocks
Een layout template extends base.twig en vult het content block:
Taal switcher
Plugin CSS laden
Plugin CSS wordt automatisch geladen ná theme CSS, zodat themes plugin styling kunnen overschrijven: