Add Page Section Builder functionality: Introduced a new section builder for dynamic page sections in the Filament Admin panel, allowing users to add various section types with flexible key-value data management. Enhanced the Page model with methods for parsed sections and section data retrieval. Updated localization files to support new section-related terms and added comprehensive documentation for usage and best practices.

This commit is contained in:
Ümit Tunç
2025-10-30 16:28:50 -03:00
parent 0615bbecb1
commit 22b39d94a9
7 changed files with 871 additions and 1 deletions
+2 -1
View File
@@ -92,7 +92,8 @@ class PageController extends Controller
? ($page->translate('meta_description') ?: ($page->excerpt ?? null))
: ($page->meta_description ?? $page->excerpt ?? null);
$sections = $page->sections ?? $page->data ?? [];
// Use parsed_sections for easier template usage (key-value format)
$sections = $page->parsed_sections ?? $page->sections ?? $page->data ?? [];
$template = ($slug === 'home' || ($page->is_homepage ?? false))
? 'home'
: ($page->template ?? 'generic');