Implement Dynamic Header and Footer Templates in Blog Controller: Enhanced the BlogController to prioritize page-specific header and footer templates based on the 'blog' page settings. If no specific templates are set, it falls back to the default active templates. Updated the blog index view to include a header template variable for better customization. Additionally, added redirects for legacy index URLs to improve user navigation.

This commit is contained in:
Ümit Tunç
2026-01-06 22:03:05 +03:00
parent 374d4a8d7d
commit c73d448f47
4 changed files with 49 additions and 11 deletions
+1
View File
@@ -1,3 +1,4 @@
<?php $headerTemplate = "Blog Header"; ?>
@extends('layouts.site')
@section('content')
+2 -1
View File
@@ -1,3 +1,4 @@
<?php $headerTemplate = "Contact Header"; ?>
@extends('layouts.site')
@section('title', 'Anasayfa')
@@ -5,7 +6,7 @@
@section('content')
<div class="grow shrink-0">
<section class="wrapper image-wrapper bg-image bg-overlay bg-overlay-400 !text-white bg-no-repeat bg-[center_center] bg-cover relative z-0 !bg-fixed before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(30,34,40,.4)]" data-image-src="../assets/img/photos/bg3.jpg" style="background-image: url(&quot;../assets/img/photos/bg3.jpg&quot;);">
<section class="wrapper image-wrapper bg-image bg-overlay bg-overlay-400 !text-white bg-no-repeat bg-[center_center] bg-cover relative z-0 !bg-fixed before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(30,34,40,.4)]" data-image-src="../assets/img/photos/bg4.jpg" style="background-image: url(&quot;../assets/img/photos/bg4.jpg&quot;);">
<div class="container pt-28 pb-40 xl:pt-36 lg:pt-36 md:pt-36 xl:pb-[12.5rem] lg:pb-[12.5rem] md:pb-[12.5rem] !text-center">
<div class="flex flex-wrap mx-[-15px]">
<div class="xl:w-8/12 lg:w-8/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">