section : add isTitled option

This commit is contained in:
isUnknown 2024-11-05 14:44:44 +01:00
parent 8a76ab6821
commit 74b9433124
2 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -18,7 +18,9 @@
<?php foreach($page->children() as $sectionPage): ?>
<section id="<?= $sectionPage->slug() ?>" <?= e($sectionPage->backgroundColor()->isNotEmpty() == 'true', ' style="--color: ' . $sectionPage->backgroundColor() . ';"') ?>>
<h2 class="h3"><?= $sectionPage->title() ?></h2>
<?php if ($sectionPage->isTitled() != 'false'): ?>
<h2 class="h3"><?= $sectionPage->title() ?></h2>
<?php endif ?>
<?php foreach ($sectionPage->section()->toLayouts() as $layout): ?>
<div
class="section__row grid<?= e($layout->attrs()->imgHeight()->isNotEmpty() == 'true', ' fixed-img-height') ?>"