Add dynamic template system: Implemented header, footer, and section templates with corresponding models, migrations, and Filament resources. Enhanced Page model to support dynamic templates and updated localization files for new terms. Added TemplateService for managing template data and rendering. Comprehensive documentation included for usage and best practices.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Navigation
|
||||
'navigation_group' => 'Templates',
|
||||
'navigation_label' => 'Footer Templates',
|
||||
'model_label' => 'Footer Template',
|
||||
'plural_model_label' => 'Footer Templates',
|
||||
|
||||
// Sections
|
||||
'section_general' => 'General Information',
|
||||
|
||||
// Form Fields
|
||||
'field_title' => 'Title',
|
||||
'field_html_content' => 'HTML Content',
|
||||
'field_html_content_help' => 'Placeholder format: {type.field_name} e.g: {text.copyright}, {richtext.links}, {email.contact}',
|
||||
'field_is_active' => 'Active',
|
||||
|
||||
// Table Columns
|
||||
'column_title' => 'Title',
|
||||
'column_is_active' => 'Active',
|
||||
'column_pages_count' => 'Pages Count',
|
||||
'column_created_at' => 'Created At',
|
||||
'column_updated_at' => 'Updated At',
|
||||
'column_deleted_at' => 'Deleted At',
|
||||
|
||||
// Actions
|
||||
'create' => 'New Footer Template',
|
||||
'edit' => 'Edit Footer Template',
|
||||
'view' => 'View Footer Template',
|
||||
'delete' => 'Delete',
|
||||
'restore' => 'Restore',
|
||||
'force_delete' => 'Force Delete',
|
||||
|
||||
// Messages
|
||||
'created_successfully' => 'Footer template created successfully.',
|
||||
'updated_successfully' => 'Footer template updated successfully.',
|
||||
'deleted_successfully' => 'Footer template deleted successfully.',
|
||||
'restored_successfully' => 'Footer template restored successfully.',
|
||||
];
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Navigation
|
||||
'navigation_group' => 'Templates',
|
||||
'navigation_label' => 'Header Templates',
|
||||
'model_label' => 'Header Template',
|
||||
'plural_model_label' => 'Header Templates',
|
||||
|
||||
// Sections
|
||||
'section_general' => 'General Information',
|
||||
|
||||
// Form Fields
|
||||
'field_title' => 'Title',
|
||||
'field_html_content' => 'HTML Content',
|
||||
'field_html_content_help' => 'Placeholder format: {type.field_name} e.g: {text.company_name}, {image.logo}, {email.contact}',
|
||||
'field_is_active' => 'Active',
|
||||
|
||||
// Table Columns
|
||||
'column_title' => 'Title',
|
||||
'column_is_active' => 'Active',
|
||||
'column_pages_count' => 'Pages Count',
|
||||
'column_created_at' => 'Created At',
|
||||
'column_updated_at' => 'Updated At',
|
||||
'column_deleted_at' => 'Deleted At',
|
||||
|
||||
// Actions
|
||||
'create' => 'New Header Template',
|
||||
'edit' => 'Edit Header Template',
|
||||
'view' => 'View Header Template',
|
||||
'delete' => 'Delete',
|
||||
'restore' => 'Restore',
|
||||
'force_delete' => 'Force Delete',
|
||||
|
||||
// Messages
|
||||
'created_successfully' => 'Header template created successfully.',
|
||||
'updated_successfully' => 'Header template updated successfully.',
|
||||
'deleted_successfully' => 'Header template deleted successfully.',
|
||||
'restored_successfully' => 'Header template restored successfully.',
|
||||
];
|
||||
|
||||
@@ -147,4 +147,20 @@ return [
|
||||
'value_type_datetime' => 'Date & Time',
|
||||
'value_type_array' => 'Array',
|
||||
'value_type_json' => 'JSON',
|
||||
|
||||
// Dynamic Template System
|
||||
'form_section_header_template' => 'Header Template',
|
||||
'form_section_header_template_desc' => 'Select a dynamic header template for the top of the page',
|
||||
'header_template_field' => 'Header Template',
|
||||
|
||||
'form_section_template_sections' => 'Template Sections',
|
||||
'form_section_template_sections_desc' => 'Add dynamic template sections for the page',
|
||||
'template_sections_field' => 'Template Sections',
|
||||
'section_template_field' => 'Section Template',
|
||||
'add_template_section' => 'Add Section',
|
||||
'template_section' => 'Template Section',
|
||||
|
||||
'form_section_footer_template' => 'Footer Template',
|
||||
'form_section_footer_template_desc' => 'Select a dynamic footer template for the bottom of the page',
|
||||
'footer_template_field' => 'Footer Template',
|
||||
];
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Navigation
|
||||
'navigation_group' => 'Templates',
|
||||
'navigation_label' => 'Section Templates',
|
||||
'model_label' => 'Section Template',
|
||||
'plural_model_label' => 'Section Templates',
|
||||
|
||||
// Sections
|
||||
'section_general' => 'General Information',
|
||||
|
||||
// Form Fields
|
||||
'field_title' => 'Title',
|
||||
'field_html_content' => 'HTML Content',
|
||||
'field_html_content_help' => 'Placeholder format: {type.field_name} e.g: {text.title}, {richtext.content}, {image.banner}',
|
||||
'field_is_active' => 'Active',
|
||||
|
||||
// Table Columns
|
||||
'column_title' => 'Title',
|
||||
'column_is_active' => 'Active',
|
||||
'column_created_at' => 'Created At',
|
||||
'column_updated_at' => 'Updated At',
|
||||
'column_deleted_at' => 'Deleted At',
|
||||
|
||||
// Actions
|
||||
'create' => 'New Section Template',
|
||||
'edit' => 'Edit Section Template',
|
||||
'view' => 'View Section Template',
|
||||
'delete' => 'Delete',
|
||||
'restore' => 'Restore',
|
||||
'force_delete' => 'Force Delete',
|
||||
|
||||
// Messages
|
||||
'created_successfully' => 'Section template created successfully.',
|
||||
'updated_successfully' => 'Section template updated successfully.',
|
||||
'deleted_successfully' => 'Section template deleted successfully.',
|
||||
'restored_successfully' => 'Section template restored successfully.',
|
||||
];
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Navigation
|
||||
'navigation_group' => 'Şablonlar',
|
||||
'navigation_label' => 'Footer Şablonları',
|
||||
'model_label' => 'Footer Şablonu',
|
||||
'plural_model_label' => 'Footer Şablonları',
|
||||
|
||||
// Sections
|
||||
'section_general' => 'Genel Bilgiler',
|
||||
|
||||
// Form Fields
|
||||
'field_title' => 'Başlık',
|
||||
'field_html_content' => 'HTML İçerik',
|
||||
'field_html_content_help' => 'Placeholder format: {tip.alan_adi} örn: {text.copyright}, {richtext.links}, {email.contact}',
|
||||
'field_is_active' => 'Aktif',
|
||||
|
||||
// Table Columns
|
||||
'column_title' => 'Başlık',
|
||||
'column_is_active' => 'Aktif',
|
||||
'column_pages_count' => 'Sayfa Sayısı',
|
||||
'column_created_at' => 'Oluşturulma',
|
||||
'column_updated_at' => 'Güncellenme',
|
||||
'column_deleted_at' => 'Silinme',
|
||||
|
||||
// Actions
|
||||
'create' => 'Yeni Footer Şablonu',
|
||||
'edit' => 'Footer Şablonunu Düzenle',
|
||||
'view' => 'Footer Şablonunu Görüntüle',
|
||||
'delete' => 'Sil',
|
||||
'restore' => 'Geri Yükle',
|
||||
'force_delete' => 'Kalıcı Sil',
|
||||
|
||||
// Messages
|
||||
'created_successfully' => 'Footer şablonu başarıyla oluşturuldu.',
|
||||
'updated_successfully' => 'Footer şablonu başarıyla güncellendi.',
|
||||
'deleted_successfully' => 'Footer şablonu başarıyla silindi.',
|
||||
'restored_successfully' => 'Footer şablonu başarıyla geri yüklendi.',
|
||||
];
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Navigation
|
||||
'navigation_group' => 'Şablonlar',
|
||||
'navigation_label' => 'Header Şablonları',
|
||||
'model_label' => 'Header Şablonu',
|
||||
'plural_model_label' => 'Header Şablonları',
|
||||
|
||||
// Sections
|
||||
'section_general' => 'Genel Bilgiler',
|
||||
|
||||
// Form Fields
|
||||
'field_title' => 'Başlık',
|
||||
'field_html_content' => 'HTML İçerik',
|
||||
'field_html_content_help' => 'Placeholder format: {tip.alan_adi} örn: {text.company_name}, {image.logo}, {email.contact}',
|
||||
'field_is_active' => 'Aktif',
|
||||
|
||||
// Table Columns
|
||||
'column_title' => 'Başlık',
|
||||
'column_is_active' => 'Aktif',
|
||||
'column_pages_count' => 'Sayfa Sayısı',
|
||||
'column_created_at' => 'Oluşturulma',
|
||||
'column_updated_at' => 'Güncellenme',
|
||||
'column_deleted_at' => 'Silinme',
|
||||
|
||||
// Actions
|
||||
'create' => 'Yeni Header Şablonu',
|
||||
'edit' => 'Header Şablonunu Düzenle',
|
||||
'view' => 'Header Şablonunu Görüntüle',
|
||||
'delete' => 'Sil',
|
||||
'restore' => 'Geri Yükle',
|
||||
'force_delete' => 'Kalıcı Sil',
|
||||
|
||||
// Messages
|
||||
'created_successfully' => 'Header şablonu başarıyla oluşturuldu.',
|
||||
'updated_successfully' => 'Header şablonu başarıyla güncellendi.',
|
||||
'deleted_successfully' => 'Header şablonu başarıyla silindi.',
|
||||
'restored_successfully' => 'Header şablonu başarıyla geri yüklendi.',
|
||||
];
|
||||
|
||||
@@ -147,4 +147,20 @@ return [
|
||||
'value_type_datetime' => 'Tarih & Saat',
|
||||
'value_type_array' => 'Dizi',
|
||||
'value_type_json' => 'JSON',
|
||||
|
||||
// Dynamic Template System
|
||||
'form_section_header_template' => 'Header Şablonu',
|
||||
'form_section_header_template_desc' => 'Sayfanın üst kısmı için dinamik header şablonu seçin',
|
||||
'header_template_field' => 'Header Şablonu',
|
||||
|
||||
'form_section_template_sections' => 'Şablon Bölümleri',
|
||||
'form_section_template_sections_desc' => 'Sayfa için dinamik şablon bölümleri ekleyin',
|
||||
'template_sections_field' => 'Şablon Bölümleri',
|
||||
'section_template_field' => 'Bölüm Şablonu',
|
||||
'add_template_section' => 'Bölüm Ekle',
|
||||
'template_section' => 'Şablon Bölümü',
|
||||
|
||||
'form_section_footer_template' => 'Footer Şablonu',
|
||||
'form_section_footer_template_desc' => 'Sayfanın alt kısmı için dinamik footer şablonu seçin',
|
||||
'footer_template_field' => 'Footer Şablonu',
|
||||
];
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Navigation
|
||||
'navigation_group' => 'Şablonlar',
|
||||
'navigation_label' => 'Section Şablonları',
|
||||
'model_label' => 'Section Şablonu',
|
||||
'plural_model_label' => 'Section Şablonları',
|
||||
|
||||
// Sections
|
||||
'section_general' => 'Genel Bilgiler',
|
||||
|
||||
// Form Fields
|
||||
'field_title' => 'Başlık',
|
||||
'field_html_content' => 'HTML İçerik',
|
||||
'field_html_content_help' => 'Placeholder format: {tip.alan_adi} örn: {text.title}, {richtext.content}, {image.banner}',
|
||||
'field_is_active' => 'Aktif',
|
||||
|
||||
// Table Columns
|
||||
'column_title' => 'Başlık',
|
||||
'column_is_active' => 'Aktif',
|
||||
'column_created_at' => 'Oluşturulma',
|
||||
'column_updated_at' => 'Güncellenme',
|
||||
'column_deleted_at' => 'Silinme',
|
||||
|
||||
// Actions
|
||||
'create' => 'Yeni Section Şablonu',
|
||||
'edit' => 'Section Şablonunu Düzenle',
|
||||
'view' => 'Section Şablonunu Görüntüle',
|
||||
'delete' => 'Sil',
|
||||
'restore' => 'Geri Yükle',
|
||||
'force_delete' => 'Kalıcı Sil',
|
||||
|
||||
// Messages
|
||||
'created_successfully' => 'Section şablonu başarıyla oluşturuldu.',
|
||||
'updated_successfully' => 'Section şablonu başarıyla güncellendi.',
|
||||
'deleted_successfully' => 'Section şablonu başarıyla silindi.',
|
||||
'restored_successfully' => 'Section şablonu başarıyla geri yüklendi.',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user