agence-adeliom/sylius-happy-cms-plugin

A simple lightweight CMS bundle for Symfony Sylius

Maintainers

Package info

github.com/agence-adeliom/sylius-happy-cms-plugin

Type:sylius-plugin

pkg:composer/agence-adeliom/sylius-happy-cms-plugin

Statistics

Installs: 261

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v2.1.1 2026-03-09 13:38 UTC

This package is auto-updated.

Last update: 2026-03-09 13:41:24 UTC


README

Sylius Happy CMS Plugin

Happy CMS banner

OverviewInstallationDocumentation

Overview

Happy CMS is a simple Content Management System (CMS) plugin for Sylius that enables you to create and manage dynamic pages based on Sylius custom and routable resources.

The plugin brings awesome CMS features to Sylius, including:

  • Page Builder: A back-office visual interface for preview and managing pages content with various content blocks.
  • Media Management: Organize and manage media files (images, videos, documents) used in your CMS pages. Built with Flysystem storage abstraction layer.
  • SEO: Built-in SEO management for optimizing your pages for search engines.
  • Multilingue: Full support for multiple languages and locales.
  • Custom Routable Resource: Define your own entities (blog, faq, etc...) that can be routed and displayed as CMS pages with specific logic, routes and templates.
  • Menu Management: Create and manage menus for your site navigation.
  • Flexible Blocks: Use default (or create custom) various types of content blocks (text, images, videos, etc.) within your pages.
  • Shared Blocks: Reusable content blocks that can be used across multiple pages.
  • Helpers:
    • Commands to generate entities, repositories and admin classes for your custom routable resources.
    • Commands to generate blocks easily.
  • AI: Leverage AI to assist in generating content for your pages (requires API key).
  • CRUD: Integrated with Sylius Easy CRUD Plugin for simplified Sylius resources CRUD management.

Installation and documentation

  1. Install this plugin
  2. Explore documentation

Versions

Plugin Version Sylius Php Symfony New - Guide Support
1.13, 1.14 1.13, 1.14 8.2, 8.3, 8.4 6.4, 7.x See installation guide No (Alpha)
^2.0.0 ^2.0.0 8.2, 8.3, 8.4 6.4, 7.x - Sylius 2.0 [BC] Migrate from v1 guide No (Béta)
^2.1.0 ^2.0.0 8.3, 8.4, 8.5 7.4 - See installation guide
- New content model persistence, new page builder [BC] - Migrate from ^2.0.0 version
Yes

Feature preview

Page Builder preview

Page Builder preview

Installation

1. Install via Composer

composer require agence-adeliom/sylius-happy-cms-plugin --no-scripts
composer require --dev symfony/maker-bundle --no-scripts

2. Enable the Bundle

Add the plugin to config/bundles.php:

<?php

return [
    // ...
    Adeliom\SyliusEasyCrudPlugin\SyliusEasyCrudPlugin::class => ['all' => true],
    Adeliom\SyliusHappyCMSPlugin\SyliusHappyCMSPlugin::class => ['all' => true],
   
    Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true, 'test' => true],
];

3. Import Configuration

In config/packages/_sylius.yaml:

imports:
  - { resource: "@SyliusEasyCrudPlugin/config/config.yaml" }
  - { resource: "@SyliusHappyCMSPlugin/config/config.yaml" }

4. Import Routes

In config/routes.yaml:

sylius_happy_cms:
  resource: "@SyliusHappyCMSPlugin/config/routes.yaml"
  
sylius_easy_crud:
  resource: "@SyliusEasyCrudPlugin/config/routes.yaml"

5. Configure your firewall to protect preview routes

All admin users with ROLE_ALLOWED_TO_SWITCH AND ROLE_HAPPY_CMS_CONTENT_BUILDER will be able to preview CMS routable entities.

In config/packages/security.yaml

security:
    firewalls:
        #... 
        admin_happy_cms_content_builder:
            switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
            context: admin
            pattern: "%sylius.security.shop_regex%"
            request_matcher: Adeliom\SyliusHappyCMSPlugin\Security\PreviewRequestMatcher
            provider: sylius_admin_user_provider
    #... 
    role_hierarchy:
        ROLE_ADMINISTRATION_ACCESS: [ ROLE_HAPPY_CMS_CONTENT_BUILDER ]

5. Generate default files in your project (entities, repositories and admin classes) :

Actually, we don't have Symfony recipes, so we created a command to generate files automatically.

php bin/console make:happy-cms:install

This command will :

  • Create all entities, repositories and admin class
  • update config/routes.yaml by adding route properly declared
  • update config/packages/sylius_resource.yaml by adding sylius routes properly declared
  • update config/packages/sylius_happy_cms.yaml by adding new files properly declared

If something goes wrong, you can do those actions manually, check detailed configuration.

6. Install Assets

php bin/console assets:install

7. Update database

php bin/console doc:mig:diff
php bin/console doc:mig:mig
php bin/console cache:clear
# To compile our symfony UX components, you need to re run npm install and npm run build in the root of your project
npm install
npm run build

8. (Optional) Configure AI Development Guides

If you're using AI assistants (like Claude Code, GitHub Copilot, or Cursor), configure them to use the plugin's specialized guides:

For Claude Code users:

Create or update CLAUDE.md in your project root:

# Project Instructions

[Your existing project instructions...]

## Sylius Happy CMS Plugin

This project uses [Sylius Happy CMS Plugin](https://github.com/agence-adeliom/sylius-happy-cms-plugin) for content management.

### AI Development Guides

Import the AI development guides for efficient development:

- **Happy CMS development guides**: `vendor/agence-adeliom/sylius-happy-cms-plugin/docs/agents/CLAUDE.md`

For other AI assistants:

Create or update .cursorrules, AGENTS.md, or your AI configuration file with similar content pointing to the guides in vendor/agence-adeliom/sylius-happy-cms-plugin/docs/agents/.

Add "See @CLAUDE.md"

Documentation

Start by read the documentation, then you can :

  • Use bundles commands to create new routable resources (blog, faq, brand pages, etc.) see here
  • Use bundle commands to create new content blocks (flex or shared)

If this plugin helped you, please consider giving it a ⭐ on GitHub!

Made with ❤️ by Adeliom

License PHP Version Sylius Version Latest Version