2017 © Pedro Peláez
 

symfony-bundle symfony-fluid-bundle

Fluid integration for Symfony

image

mfc/symfony-fluid-bundle

Fluid integration for Symfony

  • Friday, June 8, 2018
  • by garbast
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

FluidBundle

Installation

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

Add new FluidAdapter\SymfonyFluidBundle\FluidBundle() to the Bundles in the app\AppKernel.php, (*1)

  1. add fluid template engine

Add fluid to the framework.templating.engines array in app/config/config.yml, (*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 app/Resources/views/Templates/, app/Resources/views/Layouts/ and app/Resources/views/Partials/, (*4)

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

The Versions