@php // Theme is resolved at render time. The page builder already saves each // component with its theme tag, but we still gate on activeTheme() so a // freshly-switched theme renders only its own blocks on the next request. $gdkActiveTheme = activeTheme(); $gdkThemeSlug = $gdkActiveTheme->value; $gdkLayoutView = 'frontend.layouts.'.$gdkThemeSlug.'.app'; $gdkSectionPathBase = 'frontend.pages.sections.'.$gdkThemeSlug; // Fall back to the classic layout/sections if the active theme's files // aren't present yet (defensive: e.g. mid-deploy of a new theme). if (! view()->exists($gdkLayoutView)) { $gdkLayoutView = 'frontend.layouts.app'; $gdkSectionPathBase = 'frontend.pages.sections'; } @endphp @extends($gdkLayoutView) @section('content') @if($gdkActiveTheme->value === 'zilitpay-premium' && ($page->is_home ?? false) && $components->isEmpty()) @include('frontend.pages.zilitpay-premium.home') @else @if($isBreadcrumb) @include('frontend.pages.partials._breadcrumb') @endif @foreach($components as $component) @php $gdkSectionView = $gdkSectionPathBase.'._'.$component->section_name; if (! view()->exists($gdkSectionView)) { $gdkSectionView = $gdkActiveTheme->value === 'zilitpay-premium' ? 'frontend.pages.sections.zilitpay-premium._section' : 'frontend.pages.sections._'.$component->section_name; } @endphp