Feat: Home récupère subtitle et CTA depuis les données Kirby
- Renommage des champs blueprint : cta_text → ctaText, cta_link → ctaLink - Template home.json.php : expose ctaText et ctaPath (id de page Kirby) - Home.svelte : suppression des traductions en dur, lecture de data.hero Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
51eee10c5a
commit
50f81269ac
3 changed files with 8 additions and 23 deletions
|
|
@ -23,13 +23,13 @@ tabs:
|
|||
type: writer
|
||||
marks: false
|
||||
nodes: false
|
||||
cta_text:
|
||||
ctaText:
|
||||
width: 1/2
|
||||
label: Texte du bouton CTA
|
||||
help: CTA pour call to action
|
||||
type: text
|
||||
default: Explorer
|
||||
cta_link:
|
||||
ctaLink:
|
||||
width: 1/2
|
||||
label: Lien du bouton CTA
|
||||
help: CTA pour call to action
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ $specificData = [
|
|||
'title' => $page->hero_title()->value(),
|
||||
'title_highlight' => $page->hero_title_highlight()->value(),
|
||||
'subtitle' => $page->hero_subtitle()->value(),
|
||||
'cta_text' => $page->hero_cta_text()->value(),
|
||||
'cta_link' => $page->hero_cta_link()->toPage()?->url() ?? '#',
|
||||
'ctaText' => $page->ctaText()->value(),
|
||||
'ctaPath' => $page->ctaLink()->toPage()?->id() ?? '#',
|
||||
'image' => $page->hero_image()->toFile()?->url()
|
||||
],
|
||||
'background_video' => $page->background_video()->toFile()?->url(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue