I have homepage with layout showing top menu resources/views/components/layouts/frontend.blade.php
with code :
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
@include('feed::links')
<title id="app_title">{{ ConfigValueEnum::get(ConfigValueEnum::SITE_NAME) }}</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script>
@vite(['resources/css/app.css', 'resources/js/app.js'])
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<link href="/css/flatpickr.css" rel="stylesheet">
@livewireStyles
</head>
<body class="frontend_main_color frontend_main_bgcolor p-1">
@if (Route::has('login'))
<livewire:auth-nav lazy/>
@endif
<main class="frontend_page_container_wrapper z-20 d1">
{{ $slot }}
</main>
<footer class="w-full d2" style="height: 50px !important;">
@livewire('frontend-footer')
</footer>
@livewireScripts
@stack('scripts')
@livewire('wire-elements-modal')
</body>
</html>
On home page there are both auth-nav and footer visible from layout file above.
On home page there is listing of news and link to news details :
@foreach($newsList as $news)
<a href="{{ route('news.show', $news->slug) }}" wire:navigate>
<h3 class="frontend_subtitle">
{!! Purifier::clean($news->title) !!}
</h3>
</a>
Problem is that opened news details page has no auth-nav and footer blocks visible, like
on fronted page, despite I use wire:navigate
tag and I expected I will save common layout of frontend.
NewsShowPage component has reference to “frontend” layout I show above, just like homepage component.
public function render(): string
{
return view('livewire.news.news-show-page',
['newsItem' => $this->newsItem])->layout('components.layouts.frontend');
}
resources/views/livewire/news/news-show-page.blade.php :
<div class="frontend_page_container d2" id="home_page_container">
@if(session('custom_error'))
<h4 class="admin_subtitle">
{!! AppIconFacade::get(IconEnum::Bug ) !!}
{{ session('custom_error') }}
</h4>
@endif
...
</div>
Any ideas why NewsShowPage component page has no both auth-nav or footer visible and how that can be fixed ?