{{-- Dynamic Header Component for Blog --}} @php // Get active demo $activeDemo = get_active_demo(); $isLawFirm2 = ($activeDemo === 'demo-law-firm-2'); $isDigitalAgency2 = ($activeDemo === 'demo-digital-agency-2'); $isTransportationLogistic = ($activeDemo === 'demo-transportation-logistic'); $isArchitecture2 = ($activeDemo === 'demo-architecture-2'); $isAccounting2 = ($activeDemo === 'demo-accounting-2'); // Get module configuration for title $moduleConfig = get_module_page_header_config('blog'); $blogTitle = $moduleConfig['title'] ?? config('cd-system.modules.blog.name', 'Noticias'); $blogLabel = strtoupper($blogTitle); // Determine current context and set content if (isset($post) && $post) { // Post detail view $pageTitle = $post->title ?? 'Post'; $breadcrumbItems = [ ['url' => url('/'), 'label' => __('Inicio')], ['url' => route('blog.index'), 'label' => $blogLabel], ['url' => null, 'label' => strtoupper(\Illuminate\Support\Str::limit($post->title ?? 'Post', 30))] ]; $pageSubtitle = null; } elseif (isset($category) && $category) { // Category view $pageTitle = $category->name ?? 'Categoría'; $breadcrumbItems = [ ['url' => url('/'), 'label' => __('Inicio')], ['url' => route('blog.index'), 'label' => $blogLabel], ['url' => null, 'label' => strtoupper($category->name ?? 'Categoría')] ]; $pageSubtitle = $category->description ?? null; } else { // Index view $pageTitle = $blogTitle; $breadcrumbItems = [ ['url' => url('/'), 'label' => __('Inicio')], ['url' => null, 'label' => $blogLabel] ]; $pageSubtitle = $moduleConfig['subtitle'] ?? null; } @endphp @if($isLawFirm2) {{-- Law Firm 2 Style Header --}} @elseif($isDigitalAgency2) {{-- Digital Agency 2 Style Header --}} @elseif($isTransportationLogistic) {{-- Transportation Logistic Style Header --}}
@elseif($isArchitecture2) {{-- Architecture 2 Style Header --}} @elseif($isAccounting2) {{-- Accounting 2 Style Header --}}
{{ $blogLabel }}

{{ $pageSubtitle ?? config('site.blog.subtitle', 'Trusted expertise tailored to your needs.') }}

@else {{-- Default/Other Demo Style Header --}}
{{-- Dynamic Breadcrumbs --}} {{-- Dynamic Title --}}

{{ $pageTitle }}

@if(!empty($pageSubtitle))

{{ $pageSubtitle }}

@endif
@endif