Add hide_list metadata option to directories

Add support for hide_list metadata option that allows directories to be
displayed as pages instead of lists when they contain subfolders
This commit is contained in:
Ruben 2025-11-25 20:30:11 +01:00
parent a205f2cbd7
commit 441c8bca68
2 changed files with 23 additions and 0 deletions

View file

@ -63,6 +63,14 @@ switch ($parsedPath['type']) {
// Load metadata for this directory
$metadata = loadMetadata($dir);
// Check if hide_list is enabled - if so, treat as page
if (isset($metadata['hide_list']) && $metadata['hide_list']) {
if (!empty($contentFiles)) {
renderMultipleFiles($ctx, $contentFiles, $dir);
}
break;
}
// Select list template based on metadata page_template
$listTemplate = $ctx->templates->list;