diff --git a/app/router.php b/app/router.php index 6047183..ea17ebc 100644 --- a/app/router.php +++ b/app/router.php @@ -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; diff --git a/docs/reference/metadata.md b/docs/reference/metadata.md index 3bbb381..a99faa4 100644 --- a/docs/reference/metadata.md +++ b/docs/reference/metadata.md @@ -134,6 +134,20 @@ The actual folder is `about/`, but URLs become: - `/no/om-oss/` (Norwegian) - `/fr/a-propos/` (French) +### hide_list + +**Type**: Boolean +**Used in**: Directories with subdirectories +**Purpose**: Hide list of subfolders and show only page content + +```ini +hide_list = true +``` + +When enabled, directories with subfolders display as regular pages instead of showing a list view. Useful when you need subfolders for organization but want to present a single page to visitors. + +Accepted values: `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` + ### redirect **Type**: URL string @@ -186,6 +200,7 @@ last_updated = "2025-11-02" ; Display options hide_date = true hide_author = false +hide_list = true show_toc = true ; External references