2017 © Pedro Peláez
 

symfony-bundle symfony-fluid-bundle

Fluid integration for Symfony

image

fluid-adapter/symfony-fluid-bundle

Fluid integration for Symfony

  • Tuesday, July 17, 2018
  • by mneuhaus
  • Repository
  • 3 Watchers
  • 3 Stars
  • 24 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 14 % Grown

The README.md

FluidBundle

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)

  1. add fluid template engine

Add fluid to the framework.templating.engines array in config/packages/framework.yaml, (*2)

Rendering Fluid Templates

You can simply use the built-in render method in the controller to render a fluid template like this:, (*3)

  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/, (*4)

render argument template path
AppBundle:Blog:Index AppBundle/Resources/views/Templates/Blog/Index.html
Default/Index.html src/Resources/views/Templates/Default/Index.html

The Versions