Saisonfotos am Foto statt am Erscheinungsbild

Ein Foto gehoert zu keinem (ganzjaehrig) oder mehreren Erscheinungsbildern und
erscheint nur dort, vor den ganzjaehrigen Fotos. Bausteine waehlen "automatisch"
oder eine eigene Auswahl; Titelbereich und Abschluss zeigen das erste passende
Foto ihrer Liste. Titelbild und "Bilder je Baustein" des Erscheinungsbilds werden
in die Bausteine uebernommen und entfallen dort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-29 18:53:56 +01:00
1 parent d02f3e05c7
commit 791786ed3e
21 files changed
+449 -235

No files matched your search

+4 -4
View File
@@ -43,8 +43,8 @@ public function show(string $slug): View
'sections' => $this->sections->render($this->theme(), $page->sections),
'title' => $page->isHome() ? null : ($page->seo_title ?: $page->title),
'description' => $page->seo_description ?: ($page->isHome() ? Content::get('seo.home.description') : null),
'ogImage' => $this->theme()->heroPhoto()?->url('lg') ?: null,
'structuredData' => $page->isHome() ? $this->structuredData() : null,
'ogImage' => $this->theme()->sharePhoto($page->sections ?? [])?->url('lg') ?: null,
'structuredData' => $page->isHome() ? $this->structuredData($page) : null,
]);
}
@@ -77,7 +77,7 @@ public function robots(): Response
*
* @return array<string, mixed>|null
*/
private function structuredData(): ?array
private function structuredData(Page $page): ?array
{
$property = $this->theme()->property();
if ($property === null) {
@@ -89,7 +89,7 @@ private function structuredData(): ?array
'@type' => 'VacationRental',
'name' => $property->name,
'url' => route('home'),
'image' => $this->theme()->heroPhoto()?->url('lg') ?: null,
'image' => $this->theme()->sharePhoto($page->sections ?? [])?->url('lg') ?: null,
'address' => ['@type' => 'PostalAddress', 'streetAddress' => str($property->address)->before(',')->trim()->toString(), 'addressLocality' => 'Kühlungsborn', 'postalCode' => '18225', 'addressCountry' => 'DE'],
'containsPlace' => ['@type' => 'Accommodation', 'floorSize' => ['@type' => 'QuantitativeValue', 'value' => $property->size_sqm, 'unitCode' => 'MTK'], 'occupancy' => ['@type' => 'QuantitativeValue', 'maxValue' => $property->max_guests]],
'telephone' => config('fewo.owner.phone'),