fluid-adapter/symfony-fluid-bundle

Fluid integration for Symfony

1.0.0 2017-05-01 19:14 UTC

This package is not auto-updated.

Last update: 2024-12-12 20:19:39 UTC


README

Installation

  1. install package
composer require fluid-adapter/symfony-fluid-bundle
  1. activate bundle

Add FluidAdapter\SymfonyFluidBundle\FluidBundle::class => ['all' => true] to the Bundles-Array in the config\bundles.php

  1. 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/