Front-office template for Thelia 3, built on Twig, Symfony UX and Tailwind CSS v4.
- Thelia 3.0.0 or later
- PHP 8.3+
Assets are served through Symfony AssetMapper — there is no Node build step, no bundler and no dist/ directory. Tailwind is compiled by symfonycasts/tailwind-bundle, which downloads a standalone binary on first use.
composer require thelia/flexythelia/installer places the template under templates/frontOffice/flexy. Activate it from the back office, or set it in .env:
ACTIVE_FRONT_TEMPLATE=flexy| Path | Contents |
|---|---|
*.html.twig |
Pages, at the root. config/views.yaml lists the ones a controller renders, which are not reachable by name |
components/ |
Twig components, grouped by responsibility: Atoms, Molecules, Organisms, Layouts, Forms, Fields |
src/ |
PHP: controllers, services, DTOs, Twig extensions, form types (FlexyBundle\ namespace) |
assets/ |
Styles, icons, images, Stimulus controllers |
form/ |
Form theme — applied explicitly per template, never registered globally |
translations/ |
messages.en_US.yaml, messages.fr_FR.yaml |
docs/ |
Notes on the parts whose behaviour the code alone does not explain |
A component owns its template, its styles and its behaviour in a single directory. Base.php holds the data, Base.html.twig the markup, Base.css the styles, base_controller.js the interactions.
The template declares theme_hook() extension points across its pages — layout.head.top, product.bottom, cart.top and others. A module answers one by implementing Thelia\Core\Hook\Theme\ThemeHookInterface; the tag priority drives the rendering order.
The SEOne module already answers layout.head.top and layout.head.bottom, which is where the title, description, canonical, hreflang and structured data come from.
ddev composer cs-diff # coding standards, dry run
ddev composer cs # and fix them
ddev composer phpstan-flexy # static analysis
ddev composer test:http-flexy # HTTP smoke testsRun test suites through the composer test:* scripts only. Calling vendor/bin/phpunit directly resolves to the development database instead of the test one.
GPL-3.0-or-later. See LICENSE.