fluid-adapter / symfony-fluid-bundle
Fluid integration for Symfony
Installs: 332
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 2
Type:symfony-bundle
Requires
- php: >=5.6
- symfony/asset: ~3.0
- symfony/dependency-injection: ~3.0
- symfony/form: ~3.0
- symfony/http-foundation: ~3.0
- symfony/http-kernel: ~3.0
- symfony/routing: ~3.0
- typo3fluid/fluid: ^2.0
Requires (Dev)
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2024-11-14 20:00:47 UTC
README
Installation
- install package
composer require fluid-adapter/symfony-fluid-bundle
- activate bundle
Add FluidAdapter\SymfonyFluidBundle\FluidBundle::class => ['all' => true]
to the Bundles-Array in the config\bundles.php
- add fluid template engine
Add fluid
to the framework.templating.engines
array in config/packages/framework.yaml
Rendering Fluid Templates
You can simply use the built-in render method in the controller to render a fluid template like this:
return $this->render('Default/Index.html', [
'foo' => 'bar'
]);
Template Paths
Templates are loaded from src/Resources/views/Templates/
, src/Resources/views/Layouts/
and src/Resources/views/Partials/