Files
michaelschiemer/config/cms/block-templates.php
2025-11-24 21:28:25 +01:00

165 lines
4.7 KiB
PHP

<?php
declare(strict_types=1);
/**
* CMS Block Templates Configuration
*
* Predefined block combinations that can be applied to content.
* These templates serve as starting points for common content structures.
*
* Structure:
* - 'template-id' => [
* 'name' => 'Display Name',
* 'description' => 'Template description',
* 'blocks' => [
* ['type' => 'block-type', 'data' => [...], 'settings' => [...]],
* ...
* ]
* ]
*/
return [
'landing-page' => [
'name' => 'Landing Page',
'description' => 'Standard landing page with hero, content sections, and CTA',
'blocks' => [
[
'type' => 'hero',
'data' => [
'title' => 'Welcome to Our Website',
'subtitle' => 'Discover amazing content',
'ctaText' => 'Get Started',
'ctaLink' => '#',
'backgroundImage' => null,
],
],
[
'type' => 'text',
'data' => [
'content' => '<p>This is a standard landing page template. Customize the content to match your needs.</p>',
'alignment' => 'center',
'maxWidth' => '800px',
],
],
[
'type' => 'cta',
'data' => [
'title' => 'Ready to Get Started?',
'description' => 'Join us today and experience the difference',
'buttonText' => 'Sign Up Now',
'buttonLink' => '#',
],
],
],
],
'article' => [
'name' => 'Article',
'description' => 'Standard article layout with title, content, and image',
'blocks' => [
[
'type' => 'text',
'data' => [
'content' => '<h1>Article Title</h1>',
'alignment' => 'left',
'maxWidth' => '100%',
],
],
[
'type' => 'image',
'data' => [
'imageId' => null,
'imageUrl' => null,
'alt' => 'Article featured image',
'caption' => null,
],
],
[
'type' => 'text',
'data' => [
'content' => '<p>Article content goes here...</p>',
'alignment' => 'left',
'maxWidth' => '800px',
],
],
],
],
'hero-only' => [
'name' => 'Hero Only',
'description' => 'Simple hero section',
'blocks' => [
[
'type' => 'hero',
'data' => [
'title' => 'Hero Title',
'subtitle' => 'Hero subtitle',
'ctaText' => 'Learn More',
'ctaLink' => '#',
'backgroundImage' => null,
],
],
],
],
'text-content' => [
'name' => 'Text Content',
'description' => 'Simple text content block',
'blocks' => [
[
'type' => 'text',
'data' => [
'content' => '<p>Your content here...</p>',
'alignment' => 'left',
'maxWidth' => '800px',
],
],
],
],
'image-gallery' => [
'name' => 'Image Gallery',
'description' => 'Gallery of images',
'blocks' => [
[
'type' => 'text',
'data' => [
'content' => '<h2>Gallery</h2>',
'alignment' => 'center',
],
],
[
'type' => 'gallery',
'data' => [
'images' => [],
'columns' => 3,
'spacing' => 'medium',
],
],
],
],
'columns-layout' => [
'name' => 'Columns Layout',
'description' => 'Two-column content layout',
'blocks' => [
[
'type' => 'columns',
'data' => [
'columns' => [
[
'content' => '<p>Left column content</p>',
],
[
'content' => '<p>Right column content</p>',
],
],
'layout' => '2-columns',
],
],
],
],
];