rename isArchiveMode to isBlockMode with inverted logic
Toggle now controls block mode (on = blocks, off = legacy text). Update both blueprint conditions and front template to use isBlockMode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3591af16e4
commit
e4a04cd127
2 changed files with 7 additions and 6 deletions
|
|
@ -26,12 +26,13 @@ tabs:
|
||||||
label: Chapo
|
label: Chapo
|
||||||
extends: fields/body
|
extends: fields/body
|
||||||
help: optionnel
|
help: optionnel
|
||||||
isArchiveMode:
|
isBlockMode:
|
||||||
label: Mode archive
|
label: Mode blocs
|
||||||
type: toggle
|
type: toggle
|
||||||
|
default: true
|
||||||
width: 1/4
|
width: 1/4
|
||||||
help: |
|
help: |
|
||||||
Actif : l'ancien champ body sera affiché dans le panel (texte sans médias). Utile pour éditer d'anciens articles uniquement.
|
Actif : éditeur en blocs (texte + médias). Inactif : ancien champ texte sans médias, utile pour éditer d'anciens articles uniquement.
|
||||||
when:
|
when:
|
||||||
isHtmlMode: false
|
isHtmlMode: false
|
||||||
bodyBlocks:
|
bodyBlocks:
|
||||||
|
|
@ -39,14 +40,14 @@ tabs:
|
||||||
width: 3/4
|
width: 3/4
|
||||||
when:
|
when:
|
||||||
isHtmlMode: false
|
isHtmlMode: false
|
||||||
isArchiveMode: false
|
isBlockMode: true
|
||||||
body:
|
body:
|
||||||
extends: fields/body
|
extends: fields/body
|
||||||
help: Anciens champs conservés pour archive (ne pas remplir pour les nouveaux articles). Ce champs ne sera utiliser en front que si le champs "corp" normal est vide.
|
help: Anciens champs conservés pour archive (ne pas remplir pour les nouveaux articles). Ce champs ne sera utiliser en front que si le champs "corp" normal est vide.
|
||||||
width: 3/4
|
width: 3/4
|
||||||
when:
|
when:
|
||||||
isHtmlMode: false
|
isHtmlMode: false
|
||||||
isArchiveMode: true
|
isBlockMode: false
|
||||||
htmlBody:
|
htmlBody:
|
||||||
label: Corps
|
label: Corps
|
||||||
type: textarea
|
type: textarea
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($page->isHtmlMode()->isTrue()): ?>
|
<?php if ($page->isHtmlMode()->isTrue()): ?>
|
||||||
<?= $page->htmlBody()->kt() ?>
|
<?= $page->htmlBody()->kt() ?>
|
||||||
<?php elseif ($page->bodyBlocks()->isNotEmpty()): ?>
|
<?php elseif ($page->isBlockMode()->isTrue()): ?>
|
||||||
<?= $page->bodyWithAnchors() ?>
|
<?= $page->bodyWithAnchors() ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= $page->body() ?>
|
<?= $page->body() ?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue