From 74b9433124d9bd8a49ca2139ec1ff8b27e2bdd56 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 5 Nov 2024 14:44:44 +0100 Subject: [PATCH] section : add isTitled option --- site/blueprints/pages/section.yml | 8 +++++++- site/templates/sectioned.php | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/site/blueprints/pages/section.yml b/site/blueprints/pages/section.yml index b31d95e..41e573d 100644 --- a/site/blueprints/pages/section.yml +++ b/site/blueprints/pages/section.yml @@ -6,6 +6,12 @@ tabs: label: Constructeur icon: dashboard fields: + isTitled: + label: Titrée + type: toggle + default: true + help: Affiche le titre de la section. + width: 1/4 isIndexed: label: Indexée type: toggle @@ -15,7 +21,7 @@ tabs: backgroundColor: extends: fields/color label: Couleur de fond - width: 3/4 + width: 2/4 section: label: Section type: layout diff --git a/site/templates/sectioned.php b/site/templates/sectioned.php index 7c44590..7e5fb2b 100644 --- a/site/templates/sectioned.php +++ b/site/templates/sectioned.php @@ -18,7 +18,9 @@ children() as $sectionPage): ?>
backgroundColor()->isNotEmpty() == 'true', ' style="--color: ' . $sectionPage->backgroundColor() . ';"') ?>> -

title() ?>

+ isTitled() != 'false'): ?> +

title() ?>

+ section()->toLayouts() as $layout): ?>