Skip to content

mj-jackson/symfony-fluid-bundle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

About

Symfony integration of TYPO3's Fluid templating engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.9%
  • HTML 1.1%