Onsite training

Bring our trainers team onsite to train your employees.

Learn more


PHP & MySQL

Twig for Webdesigners

Don't be afraid to write your templates with PHP, Twig comes to your rescue!


In two days, discover how to build powerful and smart templates with the Twig library and its modern features set.

Coming sessions


- Date Venue Price  
French Aug. 20 - Aug. 21 Paris 1290.00 € Register
  • This session will take place from August 20, 2012 at 9:00 AM to August 21, 2012 at 5:30 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

French Oct. 15 - Oct. 16 Paris 1290.00 € Register
  • This session will take place from October 15, 2012 at 9:00 AM to October 16, 2012 at 5:30 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

French Dec. 26 - Dec. 27 Paris 1290.00 € Register
  • This session will take place from December 26, 2012 at 9:00 AM to December 27, 2012 at 5:30 PM (Europe/Paris) and it will be hosted by Hugo Hamon.


Goals


In two days, you will learn how to leverage the power of the Twig framework thanks to its intuitive syntaxe and wide features set.


Program

Download the program as PDF

Introduction to Twig

  • Defining a template engine
  • Discovering different Twig tags
  • Understading how Twig internally works
  • Generating a basic « Hello World » application with Twig
  • Activating / deactivating auto escaping

Installing and bootstrapping Twig

  • Installing Twig from a ZIP archive
  • Installing Twig from a Subversion repository
  • Installing Twig from a Git repository
  • Insalling Twig from a PEAR package

Generating dynamic templates with Twig

  • Commenting code with Twig
  • Echoing a string or a variable content
  • Applying a filter on a variable
  • Iterating over an array of an objects collection
  • Making conditional statements with control structures
  • Using native Twig functions
  • Doing some basic arithmetics operations

Refactoring templates with inheritance, inclusion and macros

  • Integration multiple levels template inheritance
  • Including a template inside a master template
  • Splitting a template into several blocks
  • Defining a library of macros
  • Importing and using macros in templates

Session details


Reference code

TWIGC1

Price

Starts at 1290.00 € (ex. tax)

Audience

Webdesigners

Duration

2 days (14 hours)

Training type

Workshop

Topics

Template engine

Pre-requisites

PHP basics


For further information

+33 140 998 205

We remain at your disposal for further information.

Contact us