{{-- Dynamic Header Component for Projects --}} @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'); // Determine current context and set content if (isset($project) && $project) { // Project view $pageTitle = $project->title ?? 'Proyecto'; $breadcrumbItems = [ ['url' => url('/'), 'label' => 'Inicio'], ['url' => route('frontend.projects.index'), 'label' => 'Proyectos'], ['url' => null, 'label' => \Illuminate\Support\Str::limit($project->title ?? 'Proyecto', 30)] ]; } elseif (isset($category) && $category) { // Category view $pageTitle = $category->name ?? 'Categoría'; $breadcrumbItems = [ ['url' => url('/'), 'label' => 'Inicio'], ['url' => route('frontend.projects.index'), 'label' => 'Proyectos'], ['url' => null, 'label' => $category->name ?? 'Categoría'] ]; $pageSubtitle = $category->description ?? null; } elseif (isset($tag) && $tag) { // Tag view $pageTitle = $tag->name ?? 'Tag'; $breadcrumbItems = [ ['url' => url('/'), 'label' => 'Inicio'], ['url' => route('frontend.projects.index'), 'label' => 'Proyectos'], ['url' => null, 'label' => $tag->name ?? 'Tag'] ]; $pageSubtitle = $tag->description ?? null; } else { // Index view $pageTitle = 'Proyectos'; $breadcrumbItems = [ ['url' => url('/'), 'label' => 'Inicio'], ['url' => null, 'label' => 'Proyectos'] ]; $pageSubtitle = null; } @endphp @if($isLawFirm2) {{-- Law Firm 2 Style Header --}} @elseif($isDigitalAgency2) {{-- Digital Agency 2 Style Header --}} @elseif($isTransportationLogistic) {{-- Transportation Logistic Style Header --}}
@else {{-- Default Style Header --}}
{{-- Dynamic Breadcrumbs --}} {{-- Dynamic Title --}}

{{ $pageTitle }}

@if(!empty($pageSubtitle))

{{ $pageSubtitle }}

@endif
@endif