2022-09-27 16:32:06 +02:00
|
|
|
<?php
|
|
|
|
|
2025-05-30 17:15:12 +02:00
|
|
|
return function ($kirby, $site) {
|
|
|
|
|
|
|
|
// Get shared data from default controller (site.php)
|
|
|
|
$shared = $kirby->controller('site' , compact('site'));
|
|
|
|
|
|
|
|
// Get CV page URL and override logo href and aria-label attributes
|
|
|
|
$logoHref = page('cv')->url();
|
|
|
|
$logoAriaLabel = "Go to {$site->title()}'s CV page";
|
2022-09-27 16:32:06 +02:00
|
|
|
|
2025-05-08 17:10:00 +02:00
|
|
|
// Get items from image gallery structure field
|
|
|
|
$galleryItems = $site->image_gallery()->toStructure();
|
2022-09-27 16:32:06 +02:00
|
|
|
|
2025-05-30 17:15:12 +02:00
|
|
|
// Return merged arrays containing shared data and current controller data
|
|
|
|
return A::merge(
|
|
|
|
$shared,
|
|
|
|
compact(
|
|
|
|
'galleryItems',
|
|
|
|
'logoAriaLabel',
|
|
|
|
'logoHref',
|
|
|
|
)
|
|
|
|
);
|
2022-09-27 16:32:06 +02:00
|
|
|
};
|