portfolio : forcer la lecture du mockup depuis la langue par défaut. closes #47
All checks were successful
Deploy / Deploy to Production (push) Successful in 26s
All checks were successful
Deploy / Deploy to Production (push) Successful in 26s
Le champ mockup (translate: false) retournait null en version anglaise car Kirby lisait le fichier de contenu EN vide. On lit maintenant explicitement via defaultLanguage pour toutes les langues. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a043a8c281
commit
e643d0a233
2 changed files with 4 additions and 3 deletions
|
|
@ -93,6 +93,7 @@ tabs:
|
||||||
width: 1/3
|
width: 1/3
|
||||||
label: Image de mise en situation
|
label: Image de mise en situation
|
||||||
type: files
|
type: files
|
||||||
|
translate: false
|
||||||
layout: cards
|
layout: cards
|
||||||
max: 1
|
max: 1
|
||||||
size: small
|
size: small
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ $specificData = [
|
||||||
'srcset' => $f->srcset('gallery'),
|
'srcset' => $f->srcset('gallery'),
|
||||||
'webp' => $f->srcset('gallery-webp'),
|
'webp' => $f->srcset('gallery-webp'),
|
||||||
])->values(),
|
])->values(),
|
||||||
'mockup' => $project->mockup()->toFile()?->url(),
|
'mockup' => $project->content(kirby()->defaultLanguage()->code())->mockup()->toFile()?->url(),
|
||||||
'mockupSrcset' => $project->mockup()->toFile()?->srcset('mockup'),
|
'mockupSrcset' => $project->content(kirby()->defaultLanguage()->code())->mockup()->toFile()?->srcset('mockup'),
|
||||||
'mockupWebp' => $project->mockup()->toFile()?->srcset('mockup-webp'),
|
'mockupWebp' => $project->content(kirby()->defaultLanguage()->code())->mockup()->toFile()?->srcset('mockup-webp'),
|
||||||
'galleryAnimationMode' => $project->galleryAnimationMode()->value() ?: 'vertical',
|
'galleryAnimationMode' => $project->galleryAnimationMode()->value() ?: 'vertical',
|
||||||
'secondsPerImage' => $project->secondsPerImage()->isNotEmpty() ? (int) $project->secondsPerImage()->value() : 8,
|
'secondsPerImage' => $project->secondsPerImage()->isNotEmpty() ? (int) $project->secondsPerImage()->value() : 8,
|
||||||
'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(),
|
'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue